cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BobKoenen
Helper IV
Helper IV

Total sum last year regardles of filters on page

Hi all,

 

I have a report page with a Matrix table and a Month slicer. 

 

CustomerSales this yearSales previous yearTotal sales previous year
A100120700
B4050500
C901201000

 

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]

1 ACCEPTED SOLUTION
SanketBhagwat
Responsive Resident
Responsive Resident

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.

View solution in original post

2 REPLIES 2
SanketBhagwat
Responsive Resident
Responsive Resident

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.

View solution in original post

Tanushree_Kapse
Continued Contributor
Continued Contributor

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.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.