Forum Discussion

Munch00's avatar
Munch00
Icon for Helper I rankHelper I
4 years ago

Find difference between user selected period in matrix

Hi everyone

 

Really appreciate if anyone can help on my issue below. 

 

For below matrix, User can filter & select any date field that they want to compare from a very long list of dates available. Can be 3 random dates, 10 random dates etc

 

I need to add columns to show the numeric difference and % difference for each quarter TOTAL column (highlighted in yellow) between the user selected dates

 

 

To illustrate, i did up what i need in excel format. How add these columns to my matrix table in PowerBI?

Thanks everyone!

 

BR

Munch00

 

 

3 Replies

  • Remember the filter context.  Find the MIN() and MAX() of the dates that the users filtered, and base your measure computation on the difference between these.

    • Munch00's avatar
      Munch00
      Icon for Helper I rankHelper I

      lbendlin Thanks for the suggestion. But that means that i can only compare between 2 dates. The min & max. How about those dates that are in between?

       

      I read through forums on this..another way i can think is assigning an index for multiple dates and finding a difference between the dates from there. 

       

      However, this also does not work in my case as the the dates that user selected can be totally random, so index that is pre-assigned would not be correct. 

       

      Is this request even possible to do in PowerBI?

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        "Find the difference between three values and return a single number" is impossible in any reporting tool, not just in Power BI.

         

        You need to solve that graphically.