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
0 -
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)1 -
Thank you for the help. When you say change the values are you referring to the SALES CATEGORY?
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive