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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Make filter to filter in a specific table only?

I have a ClientType dimension connected to Date dim. (The ClientType has columns: ClientNo, Year and Type)

 

In the pbix  I use a filter on Date dim, on year, which correctly filters my fact in the visualizations… It also correctly filters the dimension for the selected year.

 

My issue is; that I want to use the same dimension value for both current year and LY measures:

 

 

Revenue YTD := CALCULATE([Revenue] , DATESYTD('Date'[Date] ,"31/05" ))

Revenue LYTD:=CALCULATE( [Revenue YTD],  SAMEPERIODLASTYEAR('Date'[Date]))

 

 

(This second measures: fetchs data for last year, and is also trying to pick the dimension from last year (which I dont want!!)… And I get the strange behavior where I can see the data but not in the dimension only in the total…)

 

ovonel_0-1631257876239.png

 

 

1 REPLY 1
AllisonKennedy
Super User
Super User

@Anonymous Have you marked your date table as a date table? https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html 

 

I prefer DATEADD to SAMEPERIODLASTYEAR, but both should work if you have the date table marked correctly... 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors