Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a switch measure with below formula :
measure = SWITCH ( SELECTEDVALUE(Column1)),"Category1",[Measure1],"Category2",[Measure2],"Category3",[Measure3]...))
Now when i select Category1 and Category2 in Slicer, the measure is blank, i know switch only works on 1 selection. Is there any alternate way to achieve this?
Solved! Go to Solution.
Hi @Anonymous
If I understand you correctly, you need
SWITCH with multiple conditions.
In the following link, you will find an explanation and example that may be helpful:
https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/dax-query-language-for-power-bi-and-power-pivot/switch/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I just tried this and it's working for me:
IF(AND(SELECTEDVALUE('Table1'[Column1]) = "whatever", SELECTEDVALUE('Table2'[Column2]) = "2nd whatever"), "Bring me this",
IF(AND(SELECTEDVALUE('Table1'[Column1]) = "otherwhatever", SELECTEDVALUE('Table2'[Column2]) = "2nd otherwhatever"), "Bring me this other thing"))
Seemingly you can nest it as far as you want, I'm at 2 criteria, 2 selections each for a possible combination of 4. I don't know if that's the best way to do this but I haven't been able to find any other suggestions and it is working <shrug>
Hola, creo que tengo una duda similar al primer comentario, en mi caso en el cuadro que se muestra por defecto quiero mostrar más de un dato de una misma columna, me explico, tengo un gráfico de barras que muestra los días en que se realizó un inventario, en el popup se muestran varios datos que agregue, pero hay uno que es el nombre del proveedor y son varios por día, cuando agrego la columna al tooltip solo me muestra el primero o el último, se pueden mostrar todos?
asi es como sale ahora, la segunda fila categoria, la tengo en otra tabla,
si lo hago con la misma tabla, me sale solo un nombre, el primero o el ultimo
la idea es que salgan todos estos.
COLISEO CV TRADING |
COMERCIAL MARSHALL Y SALAS SPA |
MODULBOX SPA |
NUTRISCO CHILE S A |
SOCIEDAD PUNTA DE LOBOS SA |
TAMY SPA |
TECNOPAPEL S A |
y despues de poder hacer eso, poder poner un switch de condicion, para que muestre otra columna en el caso de otra condicion.
La otra opcion que tambien me sirve es agregar una hoja nueva con la informacion como un tooltip, la estuve creando pero puedo mostrar la informacion que necesito, pero ademas necesito usar un switch supongo para cambiar la informacion.
este es para un almacen.
este es para otro
en ambos almacenes cuando hay mas de una categoria al dia. no muestra informacion
encontre esta formula :
I just tried this and it's working for me:
IF(AND(SELECTEDVALUE('Table1'[Column1]) = "whatever", SELECTEDVALUE('Table2'[Column2]) = "2nd whatever"), "Bring me this",
IF(AND(SELECTEDVALUE('Table1'[Column1]) = "otherwhatever", SELECTEDVALUE('Table2'[Column2]) = "2nd otherwhatever"), "Bring me this other thing"))
Seemingly you can nest it as far as you want, I'm at 2 criteria, 2 selections each for a possible combination of 4. I don't know if that's the best way to do this but I haven't been able to find any other suggestions and it is working <shrug>
@Anonymous
Hi @Anonymous
If I understand you correctly, you need
SWITCH with multiple conditions.
In the following link, you will find an explanation and example that may be helpful:
https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/dax-query-language-for-power-bi-and-power-pivot/switch/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
38 | |
31 |
User | Count |
---|---|
78 | |
64 | |
64 | |
49 | |
45 |