Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all , if i have a sample data like ,how to write a dynamics expression
category decision material lot
smelting accepted spix 10
smelting rejected spix 20
smelting exception spix 30
mining accepted hydra 25
mining rejected hydra 35
mining exception hydra 45
so i need a dynamic expression : category={smelting},decision={accepted } and that particular material lot = 10 in percentage
category={smelting} total lot (10+20+30)
thanks
naveen
If you want dynamic, based on selection then create two variables on front end
vCategory = concat (distinct chr(39) category chr(39) ,',')
vDecision = concat (distinct chr(39) decision chr(39) ,',')
Now write the expression
Sum({<category = {$(vCategory)}, decision = {$(vDecision)}>} lot) / Sum({<category = {$(vCategory)}>} lot)
or
Sum({<category *= {$(vCategory)}, decision *= {"$(vDecision)"}>} lot) / Sum({<category *= {$(vCategory)}>} lot)
Expression will show error but it will work
Edit: remove " from set
hi!
try this num(sum(lot)/sum(TOTAL{<decision=>} lot),'#,##0%')