Forum Discussion

NadiaLR1234's avatar
NadiaLR1234
Helper I
4 years ago
Solved

Calculate difference based on text column

Hi

Is there a way for me to calculate the difference between averages on the below senario ?

I have 4 groups (0-3 Days, 4-7 Days, 8-14 Days and 15+ Days) - I want to calculate what the difference between any specified group is - so example difference between Avg 0-3 Days and Avg 4-7 Days will be on first line -543 etc - how do I write the dax measure/column to calculate this difference ? even if I have to have multiples that is fine as long as it gives the correct difference ?

 

 

  • hi again, 

    Please look at this pbix example in the following LINK 

     

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
    Best Regards
    BC

6 Replies

  • onurbmiguel_'s avatar
    onurbmiguel_
    Power Participant

    Hello NadiaLR1234, 

    You need to  create independent measures, but why do you need all the difference? 
    It will be some measures, and how the values must appear to the users? 
    How the total will work?

    Why not to expose this information in a visual / graph that explain to users the up and down of values.

     

    BR 

    Bruno

     

     

  • Hi - I need to show the difference between the different categories so I can show the lost/gained savings on each category  and then when they move a certain % over to a selected one what the difference will be

    • onurbmiguel_'s avatar
      onurbmiguel_
      Power Participant

      Hello again NadiaLR1234

      Can you share a draft of the pretended output 
      The 4 groups are column in the model? 
      we need to do all difference ?

      • 0-3 Days vs 4-7 Days
      • 0-3 Days vs 8-14 Days
      • 0-3 Days vs 15+ Days
      • 4-7 Days vs  8-14 Days
      • 4-7 Days vs 15+ Days
      • 8-14 Days vs 15+ Days

       

      BR

      Bruno