Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to create a new measure which will determine if a record matches a value in a slicer table.
If I have three records in table Z used to populate the Slicer with records A,B,C.
Then I would like to create a measure in table Y to determine if column 1 = a value selected in the slicer.
i.e. If Column1.value = Slicer.Selectedvalue then "y" else "n"
Is the slicer table disconnected from the records table? That is, there is no relationship between the two tables? If so this is easy.
Assuming they are disconnected and you are displaying every row from the records table individually, this will wok.
Measure = IF( FIRSTNONBLANK(RecordTable[Column1], 1) = FIRSTNONBLANK(SlicerTable[SlicerColumn], 1), "y", "n")
Proud to be a Super User!
Thanks for the suggestion.
Yes the slicer table is "unrelated" to the record table.
I tried your suggestion and it works if a single record is selected in the slicer table, but when multiple items are selected it only selects the "FirstNonBlank" which may or may not be the correct value to select.
Anyone else with further suggestions?
Are you saying you want it to check if each record value equals any of multiple selected values in the slicer?
Proud to be a Super User!
yes that's correct.
Hi @Anonymous,
Please try the CONTAINS function. Please use the formula below and check if it works fine.
result=IF(CONTAINS(SlicerTable, ALLSELECTED(SlicerTable[SlicerColumn]), FIRSTNONBLANK(RecordTable[Column1], 1)),"yes","No")
Best Regards,
Angelia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |