Forum Discussion
Different formats in switch function
- 5 years ago
PwrBI01 ,
Create a meaure with the below DAX:
MEASURE = IF(HASONEVALUE('T_M_Tabla indicadores económicos'[Medida]);SWITCH(VALUES('T_M_Tabla indicadores económicos'[Medida]);"Variación prev. año";FORMAT([Acumulado dos años previos],"#.### $");"% crecimiento";FORMAT([Acumulado var %],"Percent");"Importe medio";FORMAT([Switch importe medio],"## $");"% Var importe medio";FORMAT([Switch importe medio % var],"Percent");"Variación a fecha";FORMAT([Acumulado var],"#.### $")))
P.S. Just replace the $ sign with Pound sign while writing this dax as per your currency requirement.
PwrBI01 , You have to use calculation groups for that as of now
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/
- PwrBI015 years agoPost Patron
Thank you very much for your answer amitchandak but I would like to do it in a more easy way.