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'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]))
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |