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.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
- 603 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 697 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
- 40 Getting Started
- 30 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive