Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, is it possible to improve this very very long if statement? (see attached)
basically it would be great if I can calculate $(eCharge) only once but what happens it is calculated 90 times in that if then. I have to use it in a chart though so I cannot use dollar expansion - it should respect chart dimensions.
$(eCharge) expanded to SUM( {complex set analysis exp here} [Charge Amount])
If you´re using a straight table
1) Create na expression. using $(echarge), get the index of your column and mark it to now show
2) Modify your expression. to use column(yourindexhere)
using such a lengthy IF ELSE may have negative impact on your UI. Can you please see if you can handle couple of evaluations at a script level or use Dollar Expansion expressions.
unfortunately this has to be calculated on the fly since it should respect user selections. No, I cannot sue dollar expansion on the whole expression because expressions are expanded BEFORE chart is calculated hence expression would not respect dimensions in a chart.
If you´re using a straight table
1) Create na expression. using $(echarge), get the index of your column and mark it to now show
2) Modify your expression. to use column(yourindexhere)
this is much faster, you are Clever indeed
thanks a lot!