Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I have this matrix
As you can see, the rows are aggregated by months, quarters and years. The values in the matrix are about sales.
Now I need to calculate the difference between the sales in a month and its previous one. The same must be done for quarters and years.
I do some examples. I need to calculate the difference between
- Year 2021 and Year 2020
- Quarter2 2020 and Quarter1 2020
- Quarter4 2020 and Quarter1 2019
- February 2021 and Jenuary 2021
- Jenuary 2021 and December 2020
To make things more complicated 😞 User can filters data. So for example, he could decide to visualize in the matrix data just for 2015 and 2018, then excluding 2016 and 2017. In that case, I should consider 2014 as the previous row of 2018 and not 2017.
Then, in this situation
I need to calculate the difference between
- Year 2018 and Year 2015
- Quarter2 2018 and Quarter1 2018
- Quarter4 2015 and Quarter1 2018
- February 2018 and Jenuary 2018
- Jenuary 2018 and December 2015
Any help is appreciated.
Thnak you
HI @Simone2004,
Any update on your requirement?
You can also take a look at the following link to know how to use if statement checks current hierarchy level then you can write a formula with filter for these parameters range calculation.
Clever Hierarchy Handling in DAX - SQLBI
Regards,
Xiaoxin Sheng
HI @Simone2004,
Current power bi visual aggerate feature does not support these, you need to manually write measure formula with filter condition to calculate and compare with specific range records.
If you confused about the coding formula, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@Simone2004 , as of now, power bi does not support row operations, which means the difference has come from measures.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |