Forum Discussion
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?
Hi Anonymous ,
You could refer to my sample for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- parry2kSuper User
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.⚡
- AnonymousNot applicable
Hi parry2k ,
Of course!
I made a sample set of two columns > Month and year and Customers.
The link is as follows:
https://drive.google.com/file/d/11gz9gMfT2QmjezEj6ExlPBpBlUFg_y_5/view?usp=sharing
- daxCommunity 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 ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.