Forum Discussion
sublog
Helper III
6 years agoDynamically change measure's format in visual (line chart) using switch?
I have a line chart that I am using a switch statement to select two different groups of measures. One is a whole number and the other is in currency. Is there a way to have the chart automatica...
mahoneypat
Microsoft Employee
6 years agoUse the FORMAT() function like this
Format Test = var tempsum = SUM('Table 2'[Value])
return if(tempsum>5, FORMAT(tempsum, "Currency"), FORMAT(tempsum, "Percent"))
You can adapt for your measures. There are pre-defined ones (like above or you can do custom).
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
sublog
Helper III
6 years agoI tried this, but I can't figure out how to make it show in the line chart visual. It won't even allow me to move the measure to the Values.