Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Right now we are using this type of expression in our charts:
if(vPrice='net', sum(net sales), sum(gross sales))
Would it be a more optimal (by that I mean faster) choice to use 2 expressions with an enable condition?
sum(net sales) <-- enable condition (vprice = 'net')
sum(gross sales) <-- enable conditon (vprice = 'gross')
What I would like to know is, if the expression fails the condition and is disabled from chart, is there any calculation going on by QV? Also is there any overhead in using a condition on a chart expression?
TIA
sum (if( vPrice='net', net sales,gross sales))
I've seen with around 200K records having multi level "if else" block inside single expression caused Out of Object Memory issue in my dashboard. so I used multiple conditional expressions instead.
You can always use Error Messages to display Custom Messages to the end users in case of errors in the calculation.
The enable condition must be computed anyway so I should prefer the initial If.
If you have to export in excel the enable condition slow a lot the operation.
writing expression at UI slow downs the performance of application
so we should try to write in script.
like above expression
in Script if( vPrice='net', net sales,gross sales) as Sales
and In UI write sum(Sales)
hope this helps
The variable is set by the user (via drop down) in the GUI. So writing it in the script is not an option.
Thanks,
better u can use below
sum (if( vPrice='net', net sales,gross sales))