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
Vincent2000
New Member

One segment filter applied on two columns

Hello everyone,

 

I would like to have the possibility to display information from my data however a date (year) is present in at least one of two columns with date.

For exemple with the following table:

ProjectNameYear1Year2
Proj120232024
Proj220242024
Proj320232023
Proj420222023
Proj520222022

 

If my segment filter is set to "2023", my page display the table with the lines containing 2023 wherever it is in column "Year1" or "Year2" :

ProjectNameYear1Year2
Proj120232024
Proj320232023
Proj420222023

 

Do you have any idea ?

Thank you

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Vincent2000 

you can try this.

 

1. create a new table for filtering (do not create relationship with your fact table)

Table 2 = DISTINCT( union(DISTINCT('Table'[Year1]),DISTINCT('Table'[Year2])))
 
 

11.PNG

 

2. create a measure

Measure = if(max('Table'[Year1])=max('Table 2'[Year1]) || max('Table'[Year2])=max('Table 2'[Year1]),1)
 
then add this mesure to the visual filter and set to 1
 
12.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@Vincent2000 

you can try this.

 

1. create a new table for filtering (do not create relationship with your fact table)

Table 2 = DISTINCT( union(DISTINCT('Table'[Year1]),DISTINCT('Table'[Year2])))
 
 

11.PNG

 

2. create a measure

Measure = if(max('Table'[Year1])=max('Table 2'[Year1]) || max('Table'[Year2])=max('Table 2'[Year1]),1)
 
then add this mesure to the visual filter and set to 1
 
12.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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