Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prashantsanchet
Creator
Creator

Dynamic dimension in set analysis

Hi team,

  • I have one dimension as customer  and the measure as sum({<[customer={"=Sum([discount])>=1000"} >}sales)

  • Now i want that dimention value to be dynamically vary based on user selection.

  • I have one listbox (cliember selection list box extension") where user can select the dimension which he wants.and this will be stored in variable vSelectedDimension.

  • I have created a one variable vDynamicDimension   which will return actual dimension value. 

          if( vSelectedDimension='Customer'   ,[Customer], if( vSelectedDimensionr='Region' ,[Region] ))

  • Now i am trying to use $(vDynamicDimension) as dimesion and

        Sum({<[vDynamicDimension={"=Sum([discount])>=1000"} >}sales) as measure


  • But the result in both expression is coming different. What could be the reason?
1 Reply
sunny_talwar

You might need dollar sign expansion here

Sum({<$(='[' & vDynamicDimension & ']') = {"=Sum([discount]) >= 1000"}>} sales)

or

Sum({<$(='[' & $(vDynamicDimension) & ']') = {"=Sum([discount]) >= 1000"}>} sales)