Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
dwhittaker1
Helper II
Helper II

prevent column from being sliced by date

I wrote the measure below in hopes that this measure would be uneffected by the date column on the filter pane. It is in not working, does any one have any suggestions?
 
Gross Sales 2022 = CALCULATE(SUM(FactSalesInvoiceLine[InvoiceLineAmount]),FILTER(DimDate,DimDate[Year]= 2022),ALL(DimDate[Date]))
 
dwhittaker1_0-1712711122974.png

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi  @dwhittaker1 
Modify the measure for :
Gross Sales 2022 = CALCULATE(SUM(FactSalesInvoiceLine[InvoiceLineAmount]),ALL(DimDate), 'DimaDate[year]=2022)
it should work.
That is how it looks at my example (with other data) :

 

pbix is attached

 

 

Ritaf1983_1-1712715546875.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Does this work?

Gross Sales 2022 = CALCULATE(SUM(FactSalesInvoiceLine[InvoiceLineAmount]),'DimaDate[year]=2022)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi  @dwhittaker1 
Modify the measure for :
Gross Sales 2022 = CALCULATE(SUM(FactSalesInvoiceLine[InvoiceLineAmount]),ALL(DimDate), 'DimaDate[year]=2022)
it should work.
That is how it looks at my example (with other data) :

 

pbix is attached

 

 

Ritaf1983_1-1712715546875.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors