Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi ,
I have a slicer with 3 values Choice= 1,2,3 when i use selectedvalue - >
Solved! Go to Solution.
Hi @Datavizuserpbi ,
As @PaulDBrown said, you can't return an entire column of values, you have to summarize those columns, for example to find their maximum value.
Measure =
SWITCH (
SELECTEDVALUE ( Slicer[Val] ),
1, MAX ( 'Table 2'[Ouvert N-1] ),
2, MAX ( 'Table 2'[Ouvert N-2] ),
3, MAX ( 'Table 2'[Ouvert N-3] )
)
If you want to return different columns, you need to use field parameters.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Datavizuserpbi ,
As @PaulDBrown said, you can't return an entire column of values, you have to summarize those columns, for example to find their maximum value.
Measure =
SWITCH (
SELECTEDVALUE ( Slicer[Val] ),
1, MAX ( 'Table 2'[Ouvert N-1] ),
2, MAX ( 'Table 2'[Ouvert N-2] ),
3, MAX ( 'Table 2'[Ouvert N-3] )
)
If you want to return different columns, you need to use field parameters.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IF and SWICTH functions follow the order of the expressions: if the first expressions returns TRUE(), then that will be the result of the measure. If the first expression returns FALSE, then the second row is checked etc....
What are you trying to achieve? If you need to list the selections you can try:
List selection =
CONCATENATEX(VALUES(Slicer Table[Field]), Slicer Table [Field], ", ")
Proud to be a Super User!
Paul on Linkedin.
The problem is the value of the expression it should return either 1,2 or 3 but it doesn't return 2 or 3 even they are selected with the slicer. The value by default is 1 - > Value=SELECTEDVALUE('Table 1'[Choice],1) .
The expression is always equal to the default value even if it's not selected
Sorry, I'm not sure I'm following. It works in this example:
Slicer Value =
SWITCH(
SELECTEDVALUE(Slicer[Val]),
1, "AAAA",
2, "BBB",
3, "CCC",
4, "D",
"Z")
Proud to be a Super User!
Paul on Linkedin.
Sorry let me explain with your example, slicer value is a column and based on the slicer the column slicer value is gonna be equal to:
column 1 if 1 is selected ,
column 2 if 2 is selected ,
column 3 if 3 is selected , Blank()
Slicer Value =
SWITCH(
SELECTEDVALUE(Slicer[Val]),
1, column 1,
2, column 2,
3, column 3,
Blank())The problem is the selectedvalue is always blank even if 1,2,or 3 is selected so the switch doesn't work
Val=GENERATESERIES(1, 3, 1)
Thank you for your help!
The problem is that SWITCH returns a scalar value; it cannot return a whole column, which is what your SWITCH statement returns
Proud to be a Super User!
Paul on Linkedin.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 71 | |
| 50 | |
| 47 | |
| 44 |