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.
Hello Everyone,
I am having difficulty in making a measure to calculate difference between current year formula with the last year. Assuming the data below:
Date Name Sales
01/02/2015 AAA 250
02/11/2016 BBB 500
15/3/2017 CCC 125
14/12/2018 DDD 300
15/01/2019 EEE 2
17/09/2020 FFF 100
02/05/2021 GGG 174
I have sales of different year , I want to make a dynamic measure for calculating the difference between the total sales of current year and the previous year. I have figured out to get the total sales of current year by using today and year function , but i am having diffciulty of getting the total sales of the previous year. My goal is that when we move in the next year i.e 2022, values change accordingly taking the total sales of 2022 and subtracting it from 2021. Please anyone help me on this.
Thank You,
Solved! Go to Solution.
Hi,
Thank you for your feedback.
There are many ways to create a calendar table, and calendarauto is also useful function.
In my case, I prefer to create a calendar table in Power Query Editor. The reason is that it is easy for me to create additional columns like, year / month / monthname / week of year / week of month / weeknumber / weekname / and so forth / columns .
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Anonymous
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
All measures are in the sample pbix file.
https://www.dropbox.com/s/2arv1qn2t5iiu17/hamzakhan.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello Jihwan,
Can you please tell me how you made the dates table? Is it auto calendar formula that you used?
Hi,
Thank you for your feedback.
There are many ways to create a calendar table, and calendarauto is also useful function.
In my case, I prefer to create a calendar table in Power Query Editor. The reason is that it is easy for me to create additional columns like, year / month / monthname / week of year / week of month / weeknumber / weekname / and so forth / columns .
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |