Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help with Global Measures

Hi All,    I have some data that looks something like so:   Prior Year `Sales 300 FY20 Fee Revenue Sales 100 FY20   I want to be able to show in a matrix the growth percentage ...
  • v-robertq-msft's avatar
    5 years ago

    Hi, Anonymous 

    According to your description, I can understand clearly what you want to get, you want to create a Matrix to show in a matrix the growth percentage for each row-level, right? I think you can try my steps:

    This is my test data based on your sample data:

     

    1. To get the row number of each row in the table, I click “Transform data” to go to the Power query to add an index column in the table:

     

    1. I created a measure:
    growth percentage =
    
    var _lastrow=
    
    CALCULATE(MAX('Table'[Amount]),FILTER(ALL('Table'),[Index]=MAX([Index])-1))
    
    return
    
    IF(_lastrow=BLANK(),
    
    DIVIDE(MAX([Amount]),MAX([Amount])),
    
    DIVIDE(MAX([Amount]),_lastrow
    
    ))
    1. I created a matrix chart and placed it like this:

     

    And you can get what you want.

    You can download my test pbix file here

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result so that we can help you in advance.

    How to Get Your Question Answered Quickly 

    Thank you very much!

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.