How to add a row number that changes dynamically in Table Card
Hello,
How can we add row number or rank in table card?
I have attached a screenshot for more clearification. I want to display the row number in table card which has to be refreshed everytime we apply filter. Can we do it using beast mode?
We cannot use sql or ETL as this rank has to refresh everytime the filter is applied
Thanks
Best Answer
-
You will need to make sure that you are sorting your table card with the same values that you include in the order by clause of this beastmode:
4
Answers
-
In your image, you have rank 3 listed twice. Was that a typo, or is there something more to the rank calculation than just row number?
0 -
Thats actually a typo. It should be each row number refreshing every time we change the filter or use different sorting.
0 -
You will need to make sure that you are sorting your table card with the same values that you include in the order by clause of this beastmode:
4 -
What happens when there are aggregation in the columns of table chart like AVG(Salary),SUM(Age) something like that?
0 -
Just change the count to be count(distinct) instead
0 -
When I do count(distinct) it is saying that is not a valid formula. Below is my formula. I am counting the sales names, but against their sales and i want to sum the sales. The first is invalid, but the second is not and the second wont allow aggregation
count(distinct `SalesHost`) over (order by `NetSales` desc)
count(`SalesHost`) over (order by `NetSales` desc)
0 -
When I do count(distinct) it is saying that is not a valid formula. Below is my formula. I am counting the sales names named (SalesHost), but against their sales and I want to sum the sales. I added a beastmode to calculate the rank, but need to get rid of the duplicate sales names. The first is invalid, but the second is not and the second wont allow aggregation.
count(distinct `SalesHost`) over (order by `NetSales` desc)
count(`SalesHost`) over (order by `NetSales` desc)
0 -
@user14340 - Can you provide some sample data so that I can test it out with your schema?
I'm not sure what is causing the issue. I might try
count(`SalesHost`) over (order by sum(`NesSales`) desc)
but i'm not sure if that is valid or not.
0 -
Your solution worked perfectly for aggregates.
Just as a side note I found that the below formula more accurately ranked with the method I wanted.
rank() over (order by sum(`NetSales`) desc)
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive