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
- All Categories
- 1.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 282 Workbench
- 3 Cloud Amplifier
- 4 Federated
- 2.8K Transform
- 86 SQL DataFlows
- 548 Datasets
- 2.2K Magic ETL
- 3.2K Visualize
- 2.3K Charting
- 543 Beast Mode
- App Studio
- 26 Variables
- 566 Automate
- 134 Apps
- 411 APIs & Domo Developer
- 21 Workflows
- DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 344 Distribute
- 86 Domo Everywhere
- 257 Scheduled Reports
- 1 Software Integrations
- 85 Manage
- 84 Governance & Security
- 6 Product Release Questions
- Community Forums
- 41 Getting Started
- 27 Community Member Introductions
- 81 Community Announcements
- 4.8K Archive