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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Flag field that value was found in

Hi All!

I am having some trouble getting my flag measure to work. The screenshot below shows the two measures that I would like to calculate.  I just need the measure to return a 0/1 value on whether the name selected in the slicer was found in the Name 1 column or the Name 2 column.

Please let me know your thoughts!

Thank you in advance!

ManalYunes_0-1641423784301.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your descprition, please firstly create a new table with all distinct names from Name 1 and Name 2 for slicer:

ForSlicer = DISTINCT( UNION( VALUES('Table'[Name 1]) ,VALUES('Table'[Name 2])))

Then create measures:

In name 1? = IF(MAX('Table'[Name 1])=MAX('ForSlicer'[Name]),1,0)
In name 2? = IF(MAX('Table'[Name 2])=MAX('ForSlicer'[Name]),1,0)

Output:

Eyelyn9_0-1641801388219.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your descprition, please firstly create a new table with all distinct names from Name 1 and Name 2 for slicer:

ForSlicer = DISTINCT( UNION( VALUES('Table'[Name 1]) ,VALUES('Table'[Name 2])))

Then create measures:

In name 1? = IF(MAX('Table'[Name 1])=MAX('ForSlicer'[Name]),1,0)
In name 2? = IF(MAX('Table'[Name 2])=MAX('ForSlicer'[Name]),1,0)

Output:

Eyelyn9_0-1641801388219.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @Anonymous 

 

You need to use SELECTEDVALUE formula to add a measure to your report.

Can you please let us now which column do you want to use in Slicer?

 

the measure would be like this:

Measure In name 1 = if(Selectedvalue(table[column])=max(table[Name 1]),1,0)

 

Measure In name 2 = if(Selectedvalue(table[column])=max(table[Name 2]),1,0)

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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