Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

WoW % change

Hi All,

 

I want to create a measure to show WoW% change in my visual and I'm using the below calculation:

 

Measure =
VAR lastWeekMQR =
    CALCULATE (
        [MQRs],
        FILTER (
            ALL ( F_MARKETING_RESPONSE ),
            F_MARKETING_RESPONSE[FISCAL_WEEK]
                = MIN( F_MARKETING_RESPONSE[FISCAL_WEEK] ) - 1
        )
    )
RETURN
    DIVIDE([MQRs]-lastWeekMQR,lastWeekMQR,0)
 
But its not giving the correct value, Kindly help here !!!
 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    I figured out the solution.

     

    Created a new measure for Previous Period and then calculated the WoW% using the Divide function.

     

    Previous Week MQR =
    VAR weekselection =
        MAX ( F_MARKETING_RESPONSE[FISCAL_WEEK] )
    RETURN
     CALCULATE (
                [MQR],
                FILTER ( ALL ( F_MARKETING_RESPONSE[FISCAL_WEEK] ), F_MARKETING_RESPONSE[FISCAL_WEEK] = weekselection - 1 ))
     
    WoW% = DIVIDE([MQR]-[Previous Week MQR],[Previous Week MQR],0)
     
    Correct Output:
     

     

6 Replies

  • onurbmiguel_'s avatar
    onurbmiguel_
    Icon for Power Participant rankPower Participant

    Hello Himanshu_1306

     

    Try like this: 

     
    Measure =
     
    VAR _previousWeek = MIN( F_MARKETING_RESPONSE[FISCAL_WEEK] ) - 1
     
    VAR lastWeekMQR =
        CALCULATE (
            [MQRs],
            FILTER (
                ALL ( F_MARKETING_RESPONSE ),
                F_MARKETING_RESPONSE[FISCAL_WEEK] = _previousWeek
            )
        )
    RETURN
        DIVIDE([MQRs]-lastWeekMQR,lastWeekMQR,0)
     

    Best regards

    Bruno Costa | Solution Supplier


    Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 👍

    Take a look at the blog: PBI Portugal 


    • Anonymous's avatar
      Anonymous
      Not applicable

      Its giving the same numbers. Going from 44th to 45th week % change should increase but its decreasing with the current measure

       

       

      • onurbmiguel_'s avatar
        onurbmiguel_
        Icon for Power Participant rankPower Participant

        Hi again, 

        Can you show the values in a table or send some dummy values. 

         

        Best regards

        Bruno Costa | Solution Supplier

         

        Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 👍

        Take a look at the blog: PBI Portugal