Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate change with dynamic dates

Hi everyone,

 

I want to calculate the change in customers in percentage based on a changeable period. So the measure should look like this:

([Number of customers], max_date - [Number of customers], min_date)/[Number of customers], min_date

 

For example:

Max_date      Number of customers    Min_date      Number of customers   Measure_outcome

7-2020                      1000                    12-2019               1200                         (1000-1200)/1200=16,67%

5-2020                       800                      9-2019                  600                         (800-600)/600=33,33%

 

Could someone help me with this? 

  • dax's avatar
    dax
    6 years ago

    Hi Anonymous , 

    You could refer to my sample for details.

    Best Regards,
    Zoe Zhi

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

     

6 Replies

  • Anonymous I guess this is not how your raw data looks like, solution can be very different based on how your data is shaped, so share sample data the way you have it in your mode and then we can provide a solution.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

      • dax's avatar
        dax
        Community Support

        Hi Anonymous , 

        Yes, I saw your sample, but in your sample, which part is max date? Which part is min date? If possible, could you please inform me in details? By the way, you also could rfere to my sample for details.

        Best Regards,
        Zoe Zhi

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