March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'd like to get a list of values of a column in a table so that I can do a condition where " if (_myDepartment in _valuesOfColumn, do A, else B)". I'll use the boolean value from that variable in another variable.
I can use Values function, but I need to ignore the context filter so the list has the full list of values.
In short:
I currently have a variable where
This essentially the values from a column of a table. I guess I wanna get these values dynamically.
I can't seem to find an answer for this, but any idea for how to accomplish this?
Solved! Go to Solution.
The VALUES function does this. Consider other similar functions too depending on your exact requirements: DISTINCT, ALL, ALLSELECTED).
HI @YukiK,
You can try to use the following measure formula to compare selection and list of values to return tag:
Measure =
IF (
COUNTROWS ( INTERSECT ( VALUES ( Table[Column] ), ALL ( Tableb[Column] ) ) ) > 0,
"A",
"B"
)
Regards,
Xiaoxin Sheng
HI @YukiK,
You can try to use the following measure formula to compare selection and list of values to return tag:
Measure =
IF (
COUNTROWS ( INTERSECT ( VALUES ( Table[Column] ), ALL ( Tableb[Column] ) ) ) > 0,
"A",
"B"
)
Regards,
Xiaoxin Sheng
The VALUES function does this. Consider other similar functions too depending on your exact requirements: DISTINCT, ALL, ALLSELECTED).
@YukiK , assume you want to use in a filter
filter(Table, _myDepartment in values(Table[Column]))
or
filter(Table, _myDepartment in allselected(Table[Column]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |