Forum Discussion
DAX: Rollup value within a group
- 8 years ago
Hi lacq
First add a calculated column in your FactValues
Use this Column in the Visual
CountryName = related(DimCountry[CountryName])
Now you can use this MEASURE to get the Cumulative
Cumulative = CALCULATE ( SUM ( FactValues[Value] ), FILTER ( ALLEXCEPT ( FactValues, FactValues[CountryName] ), FactValues[Date] <= SELECTEDVALUE ( FactValues[Date] ) ) )
Hi Zubair_Muhammad,
I'm sorry I didn't explain myself well.... when I said that I have a new "group by", City_name, I would like to maintain the Country Name Group... maybe the City_Name was a bad example... let's try with ProductName, so the same product might be sold in different countries.. and I would like to roll up the value by Country_Name and Product_Name .
Thanks again, lacq
Puh. More challenges I'm afraid.
I am trying to fix a Lead Time Histogram based on the unpivoted data.
When using the old (wrong method) it was fairly simple and here's the result:
Now of course I have more rows per unique key so I end up with duplicates in a number of bins...
Do I create a new rolled up table with the Summarize function or is there a clever way of doing this?
Many many thanks in advance.