Change value axis custom expression on the basis of property control (Not by set from property)

Hi Team,

I am facing a challenge while changing the value axis custom expression on the basis of property control in a stacked bar chart. I am trying the below expression to change the value axis selection from MAA to Actuals as per user selection. but when I use case statement it does not allow me to enter multiple values/custom expressions segregated by comma. is ther eany work around? I cannot ise set from property as I have 4 such charts in a single page with diff custom expressions - requirement is everything should change If user selects Actuals or MAA accordingly. Can some one help?

Case  when '${Selection}' = 'MAA' then (
Sum(DISTINCT [SC] over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X])) as [BR], 
Sum(DISTINCT [SC GF]) over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X])) as [GE+FUJI], 
Sum(DISTINCT [SC L]) over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X])) as [LiCor], 
 1 - ((
 Sum(DISTINCT [SC] over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X]))) + (
Sum(DISTINCT [SC GF]) over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X]))) + (
 Sum(DISTINCT [SC L]) over (LastPeriods(4,[Axis.X])) / Sum([Q7BW]) over (LastPeriods(4,[Axis.X])))) as [Others])

when '${Selection}'='Actuals' then (

Sum(DISTINCT [SC]  / Sum([Q7BW])  as [BR], 
Sum(DISTINCT [SC GF])  / Sum([Q7BW])  as [GE+FUJI], 
Sum(DISTINCT [SC L])  / Sum([Q7BW])  as [LiCor], 
 1 - ((
 Sum(DISTINCT [SC]  / Sum([Q7BW]) ) + (
Sum(DISTINCT [SC GF])  / Sum([Q7BW]) ) + (
 Sum(DISTINCT [SC L])  / Sum([Q7BW]) )) as [Others]) 
else 0 END

(1) Answer

Login