Forum Discussion

vjnvinod's avatar
vjnvinod
Impactful Individual
6 years ago
Solved

Week on Week Grwoth measure help

Hi Experts

 

I would like to create a week on week growth rate

below is the table

Growth should be calculated based

(Current week GLobal Ter/Previous Week Global TER)-1

 

 

then i need to make a visual like this in power BI

below i did it in excel using the above data, but not sure how to do this in power BI

 

7 Replies

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Hi vjnvinod ,

     

    If you get the value of the previous week in the current week, the problem should be simpler.

    last_week =
    VAR last_week =
        CALCULATE (
            FIRSTNONBLANK ( 'data (2)'[GlobalTER], 1 ),
            FILTER (
                'data (2)',
                'data (2)'[Channel] = EARLIER ( 'data (2)'[Channel] )
                    && 'data (2)'[period] = EARLIER ( 'data (2)'[period] )
                    && 'data (2)'[weeknum]
                        = EARLIER ( 'data (2)'[weeknum] ) - 1
            )
        )
    RETURN
        IF ( ISBLANK ( last_week ), 'data (2)'[GlobalTER], last_week )

    Please refer to this pbix.

     

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

    • vjnvinod's avatar
      vjnvinod
      Impactful Individual

      V-lianl-msft 

       

      hey thanks so much, this

      is what exactly i was trying to do but 2 conditions

      1) if there is no data for any of the weeks, then use the previous week (of the week where there is no data available) to calculate the growth

      2) I also  noticed for P5Wk1, growth should be calculated based on P4Wk5 data and so on for any of the week begining period, but its not how this is done in your pbix, hence it showing growth 0%

       

      V-lianl-msft 

       

      Can you bring in the above 2 conditions and share the pbix? so i can close this thread?

      thanks for much for your help

      • V-lianl-msft's avatar
        V-lianl-msft
        Community Support

        Hi vjnvinod ,

         

        Please sort the columns in edit queries and then add an index column.

        The sample pbix has been updated.

         

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