The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |