How to Show all the data after applying Filter in Zoho Analytics with 0 - data-analysis

I Have data of customers shopping with shopping date. Now I have applied a filter on the shopping date. But it eliminates the customers who have not bought something on given dates. How can I list all the customers whether they have bought something or not. if they have bought something then no of count and not then 0

You need to change the Filter. Please Update Filter columns base on Requirements

Related

NetSuite REST API - How to update a sales order as shipped with Tracking Number

I am trying to find a way to update a Sales Order as "shipped" back to Netsuite and to add the Tracking Number.
I can't find the best way to do this. I have researched the Sales Order API and the Patch request looks like there is no specific field for a Tracking Number.
PATCH /salesOrder/{id}
Or the best endpoint to use is the Item Fulfillment?
https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2021.1/index.html#tag-itemFulfillment
Any ideas are appreciated, thank you!
the tracking number field is a derived field -- it is derived from the tracking numbers on any invoices that are linked to the sales order. To get that field to populate, first create an item fulfillment from the sales order using a transformation and then create an invoice from the sales order, also using a transformation. If you fill out the tracking number on the invoice, it will also appear in the tracking numbers field on the sales order.

How to display a value based on a different value in a different table in an MS Access form?

I am a complete beginner. I am working on an invoicing project. Essentially, I have a table (tblCustomers) that stores a value (SalesType). The SalesType can be one of these values: Cash Sale or Trade Sale.
In another table (tblProducts), I have a list of products and their price. The prices are either a cash price or trade price. ProductType,CashPrice & TradePrice.
At the moment, on my invoice form (frmInvoice), I have 3 items. A combo box where user can select the product, a text box that displays the Cash Price and another text box that displays the Trade Price.
What I am looking for is a way for Access to check the SalesType from tblCustomer for a given customer and depending on what is listed there, i.e. either cash sale or trade sale, for a text box to display the correct price.
Read this article to use DLookup() function. It will solve your problem.
DLookup Function

MS Access - Customized Price List

In MS Access, I've got Table A that lists products with the price for each product and Table B with Customer Name, Customer ID and the Profit Margin associated for each customer.
What I need to do is create a customized price list for each customer based on their profit margin. Each customer will receive the exact same list of products from Table A. The only difference being that the price column in Table A will change depending on the Profit Margin column contained in Table B.
Ultimately, I would use this to create a report that would then be emailed out to each customer.
I’m having some difficulty figuring out how to set it up so that all customers in Table A are linked to one price list with differing prices depending on their profit margin.
If anyone could help give me a push in the right direction I would greatly appreciate it.
Thank you
I'm assuming you have the following tables:
tblProducts, with fields Product and Cost.
tblCustomers, with fields Customer and Margin.
I'm not sure how your margin works (is it a factor which is multiplied by the cost, or a fixed amount which is added on?), but the formula should be easy to work out to suit your needs.
Create a query. In query design mode, show the two tables. Add the field tblProducts.Product to your query, and the expression [tblProducts].[Cost] * [tblCustomers].[Margin].
In the Criteria for this expression, you can set, for example, [tblCustomers].[Customer] = "John". Or, instead of specifying a particular customer, you could reference a control on a form. In this way, changing the control on the form (eg. selecting a customer from a listbox) will change which customer's data the query is based on.
Then you can build a query on the report as usual.

Architecture: Ordering in Rails or MySQL

I have an AngularJS front-end app that sends requests to a Rails API back-end. When a user search for items, so far the query is limited to 20 elements and is always ordered by popularity (a field stored in database). After the results are retrieved from DB, there is a complex process that calculates the item prices iterating one by one (remember only 20 elements). After that, the results are served to the user. Note: As told, item prices cannot be calculated directly in the query because an item can have different prices according to dates and also discounts can be applied.
This is how it´s working so far.
Now, I would like to introduce in the search results page an innocent order by: Price functionality. So, the array of items should come ordered by price.
As, I can´t get the prices directly with just one query, I see two choices:
To keep it as it is right now, I mean, making the query ordered by popularity and order the results after the prices are calculated. But I see a problem, If I get 20 elements each time ordered by popularity, then I can calculate prices and order by price these 20 elements, so I assume I´m not ordering correctly by price. This case, I would need to query without limit, to get all items, calculate prices, order them by price and return to user. I think I would also to develop a home-made pagination functionality.
Develop some kind of stored procedure in the database to provide the results with the complex prices calculations. I don´t know if I can order them easily. I´m worried because I don´t know stored procedures in MySQL and not sure if it´s possible to do what I need.
But, from the performance point of view, I guess the second choice should be better, right? I´d appreciate comments or any other options?
UPDATE:
According to comments, I detail how to calculate prices functionality.
A user can rent an item for many days (a week i.e.). So, there is a check-in and check-out dates.
Also, prices changes according to seasons. This means days can have different prices in a selected week. So, in order to calculate the total price, you have to get the daily price matching each selected day in the week and add it to the total price.
Once, the base price is calculated, there can be discounts. Same as prices, discounts can be applied only for some days, so first, it must be checked if there is any discount for the selected week. If so, the discount is applied to base price to get the total final price.
Please, let me know if you need the code.
This should be done on the backend (MySQL).
Like you mentioned, if you want to sort by price on the front-end, you'll have to replicate the entire database into Angular. Which is probably a bad idea.
This is the approach I would take in MySQL:
Set up a table with item_id, date, and price (or perform the joins necessary to get this table).
Apply discounts for each date. This step yields an interim table with updated prices.
Build your final query. Your SELECT clause should SUM(price). You should GROUP BY item_id. And you should ORDER BY SUM(price) DESC.
Depending on the size of your database, this query may require a lot of fine-tuning in order to return results quickly. But it definitely can (and should) be done in the backend.
Good luck!
EDIT: With a really big set of items, running this query through MySQL may become too slow, regardless of how much time you spend tuning performance. If MySQL doesn't cut it, you may need to rely on an auxiliary database like Elasticsearch.
But before turning to Elasticsearch/Hadoop/etc, you should think carefully about how "complex" your pricing algorithm really is. In all likelihood you can optimize the MySQL query to the point where it performs just fine.
This is a classical search listing problem. If you want to perform sort based on price, obviously you need the required inputs. it is worth mentioning that stored procedure won't magically improve the performance. The best what you can do is run recurring CRON job every hour/day ( bonus tip : use upset and perform mass operation) which updates the price. Now perform join and do the query and order it with "price". Also make sure to put indexes on required fields. After grabbing the result apply discount and show the result. If query is complex the pagination won't work. You have to do all sorts of operation manually. If you are using will_paginate , it has some function which also support Array instead of active record. Hope this helps.
So you have the following factors then:
User Inputs Beginning Date, End Date and sees list of items.
The Beginning - End Date period (selected period) is consistent for all items in the query.
To sort by price you must, for each item in the table (not just those retrieved)
Get Item Price for each day of the selected period.
Get available discounts for each day of the selected period.
Calculate Total Price for selected period.
Because user input is involved you will not be able to definitively calculate this and store the final product. The best you could do is calculate the gross and net prices per day and cache that, then performing the final calculation based on user input (or sending that data to browser for calculation there)
You could also use a first order approximation and just go with the current gross value, and then tweak from there. That assumes that the relationship between item prices remains more or less consistent.

date related query design in MS-Access

I have a table which stores prescription records of patients.
To print the prescription I designed a report based on a prescription-date query where parameter is given as Date() in criteria column to print prescription of a patient given on the today's date. In spite of correct query design as shown in help of MS-Access, the records are not seen except "Todays Date".
Fields in table are Prescription no-indexed, PNO-patient no-indexed, prescription date- which is Todays date-Date(), drug name, quantity and dosage.
I need to enter drugs and print them immediately to hand over to patients.
I dont know why its not working
Please suggest a solution. I dont have knowledge of syntax, I use built in libraries in MS-Access and have programmed forms, querys, tables and reports and macros to run the patient database.
email ID - san_sgprasadi#dataone.in
Dr Prasadi