Highlight alternating sections of rows on a table (to differentiate based on a single column)
I have a table with a lot of data to show the page history of different users (sorted chronologically by User Pseudo ID). Is there a way to highlight every other section of rows associated with each User Pseudo ID? So the user can easily see each user's page history?
So in the screenshot below... the first row would be white, second would be grey, rows 3 & 4 would be white (because it's the same user psuedo id), row 5 would be grey... further down the bottom 9 rows would be the same color (either white or grey), etc.
Answers
-
Hi @NathanDorsch ,
Not the best solution, but I hope this helps: https://www.loom.com/share/cd0cfd29478d441d923623714dfad678
John Le
You're only one dashboard away.
More video solutions at: https://www.dashboarddudes.com/pantry
John Le
You're only one dashboard away.
Click here for more video solutions:
1 -
You can utilize the DENSE_RANK window function and a MOD function to calculate alternating lines and then conditionally set your row coloring. MOD will return either 0 or 1 depending if it's even or odd to allow you to identify alternating rows.
MOD(DENSE_RANK() OVER (ORDER BY MAX(`User Pseudo ID`)), 2)
Sort your table based on the Pseudo ID as well.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Thanks Grant. Yeah, I ended up going that route... it's certainly not ideal though... :-(
First, I have to have an extra column in there... and then when I filter by values in the other columns, it throws off the color alternating...
0 -
Hi, this helped me ALOT too, thank you Grant! I have a very similar issue. However, when I use the formula given: MOD(DENSE_RANK() OVER (ORDER BY MAX(`User Pseudo ID`)), 2) my rows reduce to singular entries instead of showing each row entry to do with the Rank. So ie Apple, Apple, Apple, Carrot, Carrot, turns into just Apple, Carrot... is there any way to keep both? the ranking and all the row entries? @grahamwalkeradv
0 -
sorry my last comment was actually for @GrantSmith
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 693 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive