Forum Discussion
Anonymous
7 years agoNot applicable
Switch between different measures on graph formatting
I've have a clustered column chart and the following measure: RevenueCash_Pct Switcher2 = SWITCH([Selection3],1,[Revenue],2,[Revenue_Cash]) that allows me to switch between a dollar view and p...
v-frfei-msft
Community Support
7 years agoHi Anonymous ,
Here we can create two measures instead of a combined one to work around and format the two measures in the Modeling pane. One for percentage format and one for currency format.
doll = var sel = SELECTEDVALUE('Table'[Value])
var _sum = CALCULATE(SUM('Table'[Value]),ALL('Table'))
return
IF(sel=2,_sum,BLANK())
percent = var _min = CALCULATE(MIN('Table'[Value]),ALL('Table'))
var _max = CALCULATE(MAX('Table'[Value]),ALL('Table'))
var sel = SELECTEDVALUE('Table'[Value])
return
IF(sel=1,_min/_max,BLANK())
In your scenario, I thin you should create two measure like this.
RevenueCash_Pct Switcher1 = if([Selection3]=1,[Revenue],BLANK())
RevenueCash_Pct Switcher2 = IF (Selection3]=2,[Revenue_Cash],BLANK())
Also please find the pbix as attached.
Regards,
Frank
- v-frfei-msft7 years ago
Community Support
Hi Anonymous ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank