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 all,
I have a report page with a Matrix table and a Month slicer.
Customer | Sales this year | Sales previous year | Total sales previous year |
A | 100 | 120 | 700 |
B | 40 | 50 | 500 |
C | 90 | 120 | 1000 |
The measures [sales this year] and [Sales previous year] are dependent on the month slicer but I want the [Total Sales Previous year] measure to always show the cumulative sales of the entire previous year.
Can you help me to get the formula for [Total Sales Previous Year]
Solved! Go to Solution.
Hi @BobKoenen .
You can use;
[Total Sales Previous Year]=CALCULATE(SUM(table[column]),SAMPLEPERIODLASTYEAR(table[date])).
Regards,
Sanket Bhagwat.
If this post helps,then please mark it as 'Accept as Solution' so that other members could find it quickly.
Hi @BobKoenen .
You can use;
[Total Sales Previous Year]=CALCULATE(SUM(table[column]),SAMPLEPERIODLASTYEAR(table[date])).
Regards,
Sanket Bhagwat.
If this post helps,then please mark it as 'Accept as Solution' so that other members could find it quickly.
Hi @BobKoenen ,
Try using this measure:
Total Sales= CALCULATE(CALCULATE(SUM(Sales),ALL(Dates)),Previousyear(Dates))
Please give a thumbs up and mark it as a solution, if it answers your issue.
Thanks.
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 |
---|---|
46 | |
22 | |
20 | |
15 | |
13 |
User | Count |
---|---|
49 | |
41 | |
39 | |
19 | |
19 |