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
mic_rys
Helper I
Helper I

Create one filter for two columns with Year

Hi,

I have problem how to create "global year filter"

table:

Proj nameimplementeddeleted
Project 12010 
Project 220112014
Project 320122015
Project 42013 
Project 52014 

 

And i have 2 measures which show number of implemented and deleted projects:

Measure1 :

yearNumer of implemented
20101
20111
20121
20131
20141

 

Measure2

yearNumer of deleted
20141
20151

 

I would like to create filter Year. For example if i choose 2014 measure should show:

yearNumer of implemented
20141

 

yearNumer of deleted
20141

 

I tried with this way https://www.sqlbi.com/articles/creating-a-slicer-that-filters-multiple-columns-in-power-bi/

but if I choose "2014" it shows:

yearNumer of implemented
20111
20141

 

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mic_rys , I think you have to create a common year table and join it both years. One will be inactive, You can active that in measure using use relationship

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

This with date, you need for Year

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

New Table

Year = distinct(union(distinct(Table[implemented]),distinct(Table[deleted])))
Assume active join implemented

measure
implemented = countrows(Table)

deleted = calculate(countrows(Table), userelationship(Table[deleted], Year[implemented]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mic_rys , I think you have to create a common year table and join it both years. One will be inactive, You can active that in measure using use relationship

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

This with date, you need for Year

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

New Table

Year = distinct(union(distinct(Table[implemented]),distinct(Table[deleted])))
Assume active join implemented

measure
implemented = countrows(Table)

deleted = calculate(countrows(Table), userelationship(Table[deleted], Year[implemented]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

the simpliest solution looks the best! thank you!

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