Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to create a calculate field based on multiple IF conditions in chart in dimension field.
I know we can create easily in script but i need to put in frontend.
If($(variable)<1, 'start',
If($(variable)<2, 'End',
If($(variable)<3, 'xyz',
If($(variable)<4, 'middle','abc'))))
If $(variable) is 1, the field would return start but i need to display all values in chart
start
end
xyz
middle
abc
and measure is Sum(sales)
Please suggest me how can we create this in chart.
Thanks & regards,
Saritha.
Try this
=Only(Aggr(
If($(variable)<1, 'start',
If($(variable)<2, 'End',
If($(variable)<3, 'xyz',
If($(variable)<4, 'middle','abc'))))
,$(variable)))
For chart to show all values its better to create an inline load in the script and based on the condition you could calculate the value in the expression
you can also add the five dimensions start, end,...
then in the Show dimension if : you put $(variable)=1 for "start", $(variable)=2 for "end" , and so on
or as previously said:
you can create one calculated dimension as follows:
aggr(if($(variable)=1, 'start',if($(variable)=2, 'end')), $(variable))
but you are saying that you want to display all values?
can you elaborate more?