Grouping my data
I am building a card that lists out quantity for each Action (STARTS, RESTARTS, TERMINATES, STOPS). Each Set of Actions can fall into a different Week (WEEK1, WEEK2, WEEK3, WEEK4 & WEEK5). My data is summing up but it is creating multiple duplicate lines (See Screen shot). How do I get each action to show only once and display each weeks total vs creating new lines for each weeks totals?
Here are my CASE satements for the WEEKS as of now...
WEEK1
(CASE
WHEN `weekoffiscalperiod`='1' THEN COUNT(DISTINCT CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`))
ELSE 0
END)
WEEK2
(CASE
WHEN `weekoffiscalperiod`='2' THEN COUNT(DISTINCT CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`))
ELSE 0
END)
WEEK3
(CASE
WHEN `weekoffiscalperiod`='3' THEN COUNT(DISTINCT CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`))
ELSE 0
END)
WEEK4
(CASE
WHEN `weekoffiscalperiod`='4' THEN COUNT(DISTINCT CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`))
ELSE 0
END)
WEEK5
(CASE
WHEN `weekoffiscalperiod`='5' THEN COUNT(DISTINCT CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`))
ELSE 0
END)
Comments
-
Change the aggregate for each value in the chart to SUM or MAX
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
If that doesn't work, you can try to alter your beastmode a bit:
COUNT(DISTINCT CASE
WHEN `weekoffiscalperiod`='1' THEN CONCAT
(`DataSourceDB`,'_',`phoneid`,'_',`actionid`,'_',`reason`,'_',`date1`)
END)
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman1 -
Thank you for the help. When you say change the values are you referring to the SALES CATEGORY?
0
Categories
- 10.6K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 477 Transform
- 1.8K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 218 Visualize
- 260 Beast Mode
- 2.1K Charting
- 12 Variables
- 19 Automate
- 356 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 249 Distribute
- 65 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 191 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive