Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
Solved! Go to Solution.
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:
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.
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:
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.
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/
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |