Forum Discussion
Time Intelligence: How to perform a loop over different product groups?
- 10 years ago
Your model looks good to me so thats a great start. Are you trying to create a calculated column or a measure?
If creating a measure it should be just a case of creating a formula that incorprates the right filters
I'm guessing you will need to incorporate all or allexcept within the filters of your formula, for example
=TOTALYTD(SUM(Sales[total_value]),DimDate[DateKey], ALL(‘DimDate’))
Should override any filters/slicers you have on date
The above measure then dynamically picks up its context by the fields as you have defined in the visual (think like a pivot table) so as an example, a column chart could have geography as the axis, product as the legend and the new measure as the value and you would get columns showing sum of total value for the year to date
Your model looks good to me so thats a great start. Are you trying to create a calculated column or a measure?
If creating a measure it should be just a case of creating a formula that incorprates the right filters
I'm guessing you will need to incorporate all or allexcept within the filters of your formula, for example
=TOTALYTD(SUM(Sales[total_value]),DimDate[DateKey], ALL(‘DimDate’))
Should override any filters/slicers you have on date
The above measure then dynamically picks up its context by the fields as you have defined in the visual (think like a pivot table) so as an example, a column chart could have geography as the axis, product as the legend and the new measure as the value and you would get columns showing sum of total value for the year to date
Thanks for your help.
I've tried to do a calculated column which did not work out, but as measure it does. So the problem is solved.
Thanks again
- greggyb10 years agoResident Rockstar
Calculated columns are to be used for data that does not change between dataset refreshes. Calculated columns are not dynamic in the context of report interaction. Any sort of aggregation like this should be a measure, which will respond appropriately to filter context defined in the report.