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 everyone,
I am struggling with the creation oaf measure. I hope you can help me.
I have a table with some measures that are binary (1,0) as follow:
Now, I want my new measure to sum on of each of the measures above for each value of the "Medida" column, as follows
Medida New Measure
Baja SUMX(intensidad Baja])
Media SUMX(intensidad Media])
Alta SUMX(intensidad Alta])
This is what I did, but it didn´t worked. Hope you can use it to better understand my problem and help me to find out the solution:
New Measure = IF(CALCULATE( table1[Medida] = "Baja" ; SUMX(intensidad Baja]); IF( table1[Medida] = "Media"; SUMX(intensidad Media]); SUMX(intensidad Alta]))))
Hope you can help me and thank you very much.
Regards,
Hi @saritart1,
Please try this measure:
New Measure = IF ( SELECTEDVALUE ( table1[Medida] ) = "Baja", SUMX ( ALLSELECTED ( asistencia ), [intensidad Baja] ), IF ( SELECTEDVALUE ( table1[Medida] ) = "Media", SUMX ( ALLSELECTED ( asistencia ), [intensidad Media] ), SUMX ( ALLSELECTED ( asistencia ), [intensidad Alta] ) ) )
Best regards,
Yuliana Gu
Thank you very much @v-yulgu-msft, it worked!
One last question, if I want to include a contrain (to do it by another column) how should I do it? I did this, but it doesn´t work.
Hi @saritart1,
Please try this:
New Measure = IF ( SELECTEDVALUE ( table1[Medida] ) = "Baja"; SUMX ( ALLEXCEPT ( asistencia; asistencia[Nombre]; asistencia[Clase] ); asistencia[Intensidad baja] ); IF ( SELECTEDVALUE ( table1[Medida] ) = "Media"; SUMX ( ALLEXCEPT ( asistencia; asistencia[Nombre]; asistencia[Clase] ); asistencia[Intensidad media] ); SUMX ( ALLEXCEPT ( asistencia; asistencia[Nombre]; asistencia[Clase] ); asistencia[intensidad Alta] ) ) )
The SUMX that are you using you need to specify the table to iterate.
Example:
=SUMX('Tabla1',[expresion])
Regards
Victor
Thank you very much @Vvelarde.
my new expression is the following:
Table1 is a table that you in a slicer?
Is answer is yes, use this:
Measure=SWITCH(SELECTEDVALUE[Table1[Medida]),"Baja", ACCION1,"Media",ACCION2, "Alta", ACCION3)
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 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |