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.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1K Connectors
- 267 Workbench
- Cloud Amplifier
- 3 Federated
- 2.5K Transform
- 78 SQL DataFlows
- 524 Datasets
- 1.9K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 433 Beast Mode
- 22 Variables
- 508 Automate
- 114 Apps
- 386 APIs & Domo Developer
- 8 Workflows
- 25 Predict
- 9 Jupyter Workspaces
- 16 R & Python Tiles
- 331 Distribute
- 76 Domo Everywhere
- 255 Scheduled Reports
- 65 Manage
- 65 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 67 Community Announcements
- 4.8K Archive