Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Option 1
Sum({<Year={'2014'},Month={'Jan'}>}Sales+Profit)
Option 2
Sum({<Year={'2014'},Month={'Jan'}>}Sales)+
Sum({<Year={'2014'},Month={'Jan'}>}Profit)
please can you let me know whether option 1 or option 2 is better in performance and why
It's always best to run tests on your specific model and data to answer questions like these.
I would assume that option 1 is faster, just because it's only using one aggregation and one set analysis, but I could be wrong.
The results of both options may differ though, if Sales or Profit field may contain NULL.
Use
Sum({<Year={'2014'},Month={'Jan'}>} Rangesum(Sales,Profit) )
to be on the safe side.
Hey there,
To maximum increase performance do the following:
In the script create a field like this:
Sales + Profit as SalesProfit,
This will take less time then using Set Analysis in a expression in any chart. Tipically we want to put the most complex calculations and test in script and then use the least complex code in chart to increase the performance. So by doing the above scripting you'll only need to do a Set Analysis like this:
Sum({<Year={'2014'},Month={'Jan'}>} SalesProfit)
Doing this is better then any option you've given to us
Regards,
MB