Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a situation where i have to use If condition which has the criteria that based up on the selection on one of the field value, there are two different expressions that needs to picked up based on the value selected. Now, after implementing the If condition everything works to whats needed but the calculation time becomes much higher that it takes atleast couple of seconds to load the pivot table. In this couple of seconds is fairly negligible but i would like to consider any option that can still give the desired result with much lesser calculation time?
PFA- for example- as i cannot publish the actual app i have created a mock up but ultimately the goal is to reduce the calculation time when a selection is made on the report select there are different expressions needs to be calculated depending upon the expression.
Few things that i considered,
-Definetly i can consider this option using a variable would be better, but this an application enhancement( in this case i would need to recreate quite a few expressions)
-done as much as i can on preset condition to be implemented in the script itself already.
Not sure if this would make it faster or not, but worth a shot.
Hi Dinesh,
look in the expressions, sum (if(..... is more memoryfriendly to use in a expression.
You can also use the conditional instead. Just some hints.
even if i use the Sum(if(.... it is quite negligible difference in the calculation time. As i have too many expressions on the chart. Considerable option though.
Good morning,
Using this script:
LOAD * INLINE [
Dim1, Dim2, Dim3
cda, 12, 20
efa, 30, 38
efe, 29, 17
ose, 19, 39
cdb, 12, 20
efb, 30, 38
efb, 29, 17
osb, 19, 39
cdc, 12, 20
efc, 30, 38
efc, 29, 17
osc, 19, 39
cdd, 12, 20
efd, 30, 38
efd, 29, 17
osd, 19, 39
];
LOAD * Inline [
Dim1, Select
cda, R1
efa, R1
efe, R2
ose, R2
cdb, R1
efb, R1
efb, R2
osb, R2
cdc, R3
efc, R3
efc, R2
osc, R3
cdd, R3
efd, R1
efd, R2
osd, R1
];
LOAD * Inline [
Select, Expression
R1, "=Sum(Dim2)"
R2, "=Sum(Dim3)"
R3, "=Sum(Dim2+Dim3)"
];
I would propose that you replace the use of EXP3 by the following: $(=Expression)
Based on your selection in the Select field, the appropriate Expression shall be calculated, without going through the If() condition, which could be practical if your real expression is rather complex, or in the case where you have several imbricated If() statements.
Please find attached a new version of your original qvw file, including the proposed changes.
Regards,
Philippe