I unable to display top 5 selling menu items in a RG by Sort the sum of total sales for a selected period .
Example:
Table1 : Menu Item
Table 2 : Menu Sales
from the Above Lists, I would like to show top 5 selling Items in those two days (or a month) in a repeating group.
My expected output must be in RG
Logic I used:
To extract the unique Items, I used type as Menu Item table in the RG and extracted the sum of sales from Menu sales table for the current cell Menu Item.
The sales data keeps adding to “Menu sales” database table on a daily basis and I would like to extract a report to view top 5 or 10 menu items that are being sold for a selected period of time(week, month or year).
If I use a repeating Group with “type of content” as " Menu sales" table it will show menu items repeated. Hence to extract the Unique list of Menu Items, I used the “type of content” as " menu Items" table instead of menu sales table.
Is there any way I could use Menu sales table and get the list of unique Menu Items?
Nigel is the expert so feel free to disregard my question if you’ve already thought of this But just curious if you can add a number field to the Menu List Data type which contains the sum of Menu sales for that item? Then that field would need to be updated after every sale, and use that as the sort field?
I initially thought about doing the same way but was curious to know if there is any other way to get the real time data when a user filters with (month/Day/any specific period of time).