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
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive