Forum Discussion

Patrick_Knobel's avatar
Patrick_Knobel
New Member
10 years ago
Solved

Time Intelligence: How to perform a loop over different product groups?

Hello   I'm pretty new to Power BI and should use it for some calculations.   I have a single table for about 5000 different product groups with sales data and I want to perform some time intelli...
  • itchyeyeballs's avatar
    itchyeyeballs
    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