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.
Hello everybody,
have the following simplified scenario, I would like to be able to select columns (column 1 or column 2) first and then select operations (max or min). The Model and the Data looks as follows:
But as soon as I select column1 the operations slicer only shows one option the 'min', although min is not selected the min shows up...
how could it be realised that max does not disappear ... thx
Solved! Go to Solution.
@SteveCampbell ok thanks for the hint
measure3 = IF( SELECTEDVALUE(SelectColumn[selection]) = "column 1"; SWITCH( TRUE(); VALUES(SelectOperation[condition 2]) = "min"; MINX(numbers; numbers[Column1]); VALUES(SelectOperation[condition 2]) = "max"; MAXX(numbers;numbers[Column1]) ) ;IF( SELECTEDVALUE(SelectColumn[selection]) = "column 2"; SWITCH( TRUE(); VALUES(SelectOperation[condition 2]) = "min"; MINX(numbers; numbers[Column2]); VALUES(SelectOperation[condition 2]) = "max"; MAXX(numbers;numbers[Column2]) ) ))
"SelectColumn" and "SelectValue" are in the same table, so they are filtering each other. Best practice, would to be to put them in two seperate tables.
You could add a cartesian join, but this may become more difficult to manage if you add more columns or values (such as average, sum etc).
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
@SteveCampbell after putting them in two separate tables. I cannot select the columns from a separate table. I get an error as shown in the picture.
SelectColumn[selection] refers to a column, so it finds it difficult to compare to one value.
Try replacing with:
SELECTEDVALUE( SelectColumn[selection] )
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
@SteveCampbell ok thanks for the hint
measure3 = IF( SELECTEDVALUE(SelectColumn[selection]) = "column 1"; SWITCH( TRUE(); VALUES(SelectOperation[condition 2]) = "min"; MINX(numbers; numbers[Column1]); VALUES(SelectOperation[condition 2]) = "max"; MAXX(numbers;numbers[Column1]) ) ;IF( SELECTEDVALUE(SelectColumn[selection]) = "column 2"; SWITCH( TRUE(); VALUES(SelectOperation[condition 2]) = "min"; MINX(numbers; numbers[Column2]); VALUES(SelectOperation[condition 2]) = "max"; MAXX(numbers;numbers[Column2]) ) ))
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 |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |