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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ovonel
Post Prodigy
Post Prodigy

Precedence filter or SAMEPERIODLASTYEAR?

I see in a .pbix  the next filter page:   IsCurrentFY is 1

 

And… I also have the next measure for Last Year:   CALCULATE( xyz, SAMEPERIODLASTYEAR( 'Date'[Date] ) )

 

The visualization displays correctly; comparing xyz this year vs last year… I am wondering…

 

Why  IsCurrentFY is 1  doesn’t take precedence? Is it that SAMEPERIODLASTYEAR overrides any filter?

2 REPLIES 2
amitchandak
Super User
Super User

@ovonel , I not sure I clear with your question, but this calculation means

CALCULATE( xyz, SAMEPERIODLASTYEAR( 'Date'[Date] ) )

 

CALCULATE( xyz, filter(all('Date') , Date[Date] in <all last year date> ) )

 

refer

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

Yes, correct. My question is, what happens when you have a filter that wants to only display this year's data and a function like SAMEPERIODLASTYEAR explicitly trying to fetch last year's data...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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