Forum Discussion
antonioaceituno
8 years agoFrequent Visitor
Aggregation to avoid accounting twice
Hi, I was wondering if any of you may help me with one sintaxis issue I have: I have one table in my datasert: Column A: Country: Spain, Italy, England. Column B:Date (dd/mm/yyyy), Column C: ...
- 8 years ago
Thank you so much for your help!
It almost works, but it does not when I select different dates at the same time. Selecting more days creates conflict.
When selecting Spain & Italy days 1 & 2, the result should be
Day 1: 50+40
Day 2: 12+5
Result: 90+17=107
However, the "Card plot" says "MdxScript(Model) (3,70) Calculation error in measure 'Table1[Measure]: A table of multiple values was supplied where a single value was expected"
Thank you so much again!
- 8 years ago
Try this revised MEASURE
Measure = SUMX ( SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Country], Table1[Date] ), CALCULATE ( DISTINCT ( Table1[Daily Target] ) ) )
Zubair_Muhammad
8 years agoCommunity Champion
Try this revised MEASURE
Measure =
SUMX (
SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Country], Table1[Date] ),
CALCULATE ( DISTINCT ( Table1[Daily Target] ) )
)
antonioaceituno
8 years agoFrequent Visitor
Thank you! so useful! :smileyhappy: