Forum Academy Marketplace Showcase Pricing Features

Sorting Help ( Top 5 Items to Display)

Hello Everyone,

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.

I tried using Dynamic sort… but seems like I missed some Logic.

Can anyone please advice?

Editor Link:

Regards.

Hey @samuel :slight_smile: I think the app is still set to private. Can you switch to public?

I am not sure you can sort on derived fields ? Doesn’t it have to be on the database ?

Hi @fayewatson

The Application was always public. Not sure why you’re unable to access it (even I am unable to Access through the link :expressionless: )

@emmanuel Am I missing something here? or was there any change in procedure to share the editor link?

Sharing the Link Again.

Hi @NigelG

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?

Regards.

Nigel is the expert so feel free to disregard my question if you’ve already thought of this :slight_smile: 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 also couldn’t access the app with the link for some reason, but I could by manually typing in: https://bubble.io/page?type=page&name=index&id=samztest1

1 Like

I initially thought about doing the same way :slight_smile: 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).

Regards

This topic was automatically closed after 70 days. New replies are no longer allowed.