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, im trying to do some calculations with value from current month and compare it with las years same month as i refresh my data.
I tried the following measure to get Sales from last year's march but, it only showed total sales of 2018:
Solved! Go to Solution.
Hi @hgzelaya ,
Based on my test, you could refer to below measures:
Previous = var a=YEAR(MAX('Table1'[WorkDate]))-1 return CALCULATE(SUM(Table1[Sales]),FILTER(ALL('Table1'),'Table1'[Year]=a))
Difference = CALCULATE(SUM(Table1[Sales]))-[Previous]
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @hgzelaya ,
Based on my test, you could refer to below measures:
Previous = var a=YEAR(MAX('Table1'[WorkDate]))-1 return CALCULATE(SUM(Table1[Sales]),FILTER(ALL('Table1'),'Table1'[Year]=a))
Difference = CALCULATE(SUM(Table1[Sales]))-[Previous]
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
The measure looks ok.
Here's my test
Quick tip : to get your questions answered , paste real data not a photo of the data
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |