Aggregate count function does not work in the denominator
When I use the following statement in a card summary, it works properly. But when use it as a value in a Single Value card, the count function doesn't work anymore:
SUM(CASE
WHEN ROUND(100*`Score`/`PossibleScore`)>=60 THEN 1
ELSE 0
END)
/
COUNT( `AttemptNumber`)
For more context, the Attemptnumber column has 450 rows where each row contains a number same number (e.g. 1 or 2, etc). Therefore, I'm expecting to count 450 of them and get 450 in the denominator. But it ends up with the value of only one of the samples (e.g. 1 or 2, etc). I hope I explained it clearly.
Oddly enough, when I changed the division operation to addition it works! Any suggestion and comments are highly appreciated.
Thanks,
Musetti
Best Answer
Answers
-
@MichelleH you just solved the problem! I removed all of the sorting and now it gives the right number. Amazing!
@RobSomers that is actually great idea. Thanks!
Musetti
0 -
Hi all,
I have issue with using aggregation formula in Single Card Value.
- When I create a Beast Mode metric with rule "SUM(`OVERALL_SCORE`+0) over (partition by `VISIT_ID`)" => Drag into Single Value card => It displays 770
- When I create a Beast Mode metric with rule "COUNT(DISTINCT `VISIT_ID`)" => Drag into Single Value card => It displays 8
However, when I create a Beast Mode metric with following rule and drag to Single Value Card
SUM(`OVERALL_SCORE`+0) over (partition by `VISIT_ID`)
/
COUNT(DISTINCT `VISIT_ID`)
=> result is 323.33 which is incorrect. It should be 96.25 (770/8).
Could anyone help me with this issue? Thanks a lot!!!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive