Forum Discussion
nrenaud
5 years agoHelper I
Designating Value Types in a Measure
Hello! I am using the following measure to display data in a matrix (along with other measures). This measure displays the values I am looking for, however, some of the values are currency, some are ...
- 5 years ago
Hi nrenaud -
You should be able to use the FORMAT function around your values to get the desired result. There's a good explanation on how it works here, including some examples: https://dax.guide/format/
Fmt Measure = SWITCH(SELECTEDVALUE(MType[MType]), "Amount", FORMAT(SUM(Dates[Amount]), "$#,0.00"), "Percent", FORMAT(SUM(Dates[Percent]), "Percent"))Hope this helps
David
dedelman_clng
5 years agoCommunity Champion
Hi nrenaud -
You should be able to use the FORMAT function around your values to get the desired result. There's a good explanation on how it works here, including some examples: https://dax.guide/format/
Fmt Measure = SWITCH(SELECTEDVALUE(MType[MType]),
"Amount", FORMAT(SUM(Dates[Amount]), "$#,0.00"),
"Percent", FORMAT(SUM(Dates[Percent]), "Percent"))
Hope this helps
David