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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am attempting to make a calculated column which creates a flag when a value in the table has been selected.
The filters are applied to a dimension table which is joined to my fact table on the Prime_ID.
You can see there are 25 matches betweent those two tables, in this example with certain slicers selected.
But when I write the DAX to flag the Prime_ID if it is among the selected values, they all result in "selected".
I have tried writing this using containsrow, but the result is the same.
@talespin How do you recommend I do that?
I need a dynamic flag which updates according to the slicer selections.
I will then use that flag in the partitionby clause of a rownumber function. (the row numbers will be used to calculate decile rankings, but that is down the line. And I'm currently stuck at square one)
hi @AABright
I am not sure if you need to be at square one, there might be better approach to doing what you want to do, since we do not have any detail on your requirement, so here is my try to address square one.
You see Dim and Orders table linked on code(Integer field).
Slicer contains code from Dim table and Table visual contains all attributes from Orders table.
Create this measure
---------------------------------------------------------------
That worked great to create the flag. Thanks @talespin
Unfortunately my plan to drop that result into the partitionby clause of a rownumber function does not work. It looks like you cannot reference a calculated measure there.
I am going to write a new question on how to create dynamic decile ranking. My research for that hasn't been fruitful.
hi @AABright
"I am attempting to make a calculated column which creates a flag when a value in the table has been selected."
This is not possible, Calculated colums are refreshed during report refresh and are not influenced by slicers. You need to create measure.