Forum Discussion

jesslossa's avatar
jesslossa
Regular Visitor
3 years ago
Solved

Percent evolution Month over Month

Hello!

 

I've received a report to complete and add some visuals, and also creating some more measures. I'm trying to calculate the % evolution through month over month. 

 

The existing graph looks like this, and it's bringing the data correctly:

 

It uses this measure to complete the lines of the visual:

Rank %MS Brand = 
   IF(SELECTEDVALUE('SDBR StgDeParaMercado'[RB VS CONC]) = "CONC",
    CALCULATE([% Price MS],
    FILTER(ALL('SDBR StgDeParaMercado'[RB VS CONC]),[Rank Brand] <= 5)),
    CALCULATE([% Price MS],
    FILTER(ALL('SDBR StgDeParaMercado'[RB VS CONC]),[Rank Brand] <= 100)))

Which calls...

% Price MS = DIVIDE([Price Market],[Price Brand])
-
Price Market = CALCULATE([Total Price (DDD)], 'SDBR StgDeParaMercado'[RB MARKET] = 'SDBR StgDeParaMercado'[RB MARKET])
- 
Price Brand = CALCULATE([Total Price (DDD)], 'SDBR StgDeParaMercado'[BRAND_DESC] = 'SDBR StgDeParaMercado'[BRAND_DESC])

 

I didn't understand the logic behind equalling the same column inside the calculate function. However, if i remove the equalling of "Price Brand", or if I remove from both Price measures, the graph looks like this:

 

And I need to replicate the same logic to make another similar graph, only changing the legend. But, even if I keep the calculate function equalling the same column inside the Price measures, in another graph visual on another page, I keep getting the last result, like the above image.

 

Could you guys help me understand the logic behind this? I unfortunately can't contact the person who made the report because they left the company.

 

Thank you very much! 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi jesslossa ,

     

    About the logic behind equalling the same column inside the calculate function.

    To my understanding, this way of writing does not seem to make sense, usually we need to use "earlier" or "max" or something to indicate the current row.

     

    Best regards,

    Community Support Team Selina zhu

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

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jesslossa ,

     

    About the logic behind equalling the same column inside the calculate function.

    To my understanding, this way of writing does not seem to make sense, usually we need to use "earlier" or "max" or something to indicate the current row.

     

    Best regards,

    Community Support Team Selina zhu

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