Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys am struggling with this expression
what i want to acheive: If Order is 3 then sum of sales of order number 2 divide by sum of sales of order number 1 * 100 as i want it in % else sumofsales)
am using this code below which is not returning anything
IF([order] = '3',
SUM({<[order] ={'2'}>} [salessum]) / SUM({<[order] ={'1'}>} [salessum])*100
,[sumofsales]
)
in summary sum of order 2 = 250/sum of order 1 = 500 = 50% - intended result
How can I can get this to work ? thanks in advance
@dching Perhaps this adding percentile.
IF([order] = '3',
Num((SUM({<[order] ={'2'}>} [salessum]) / SUM({<[order] ={'1'}>} [salessum]))*100, '#,#0%')
,[sumofsales]
)
Hi @dching,
That looks like something I would move to the Load Script instead of trying to solve on the charts.
Can you please share with us your Load Script and the chart you are trying to build?