Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if([Report Flag]='y',
-if([RA Type]=AccType,[BalanceYTD],-[BalanceYTD]),
if([RA Type]=AccType,[BalanceYTD],-[BalanceYTD]))
Report Flag and RA Type are from table 1 and BalanceYTD and RA Type are from other table. Both tables are linked by an other table.
I am using the above expression in a variable and used in most of the charts in my dashboard along with set analaysis.
Is there a way to handle this to optimize the performance of this expression.
Can i handle in scrip, if so may i know how to do?
Thanks
Gautham
If I understand it right you queries the flag and type to set the BalanceYTD positive or negative. This could be done within the script by creatin (an additionally) flag-field to your BalanceYTD which contains 1 or -1 (matching between both tables per mapping and applymap: Mapping as an Alternative to Joining) and then within your calculations xou could use something like: sum(BalanceYTD * FlagBalanceYTD) which would be a lot more performant as the if-loops.
- Marcus
As Marcus suggested,
Use ApplyMap (Mapping) instead of Join.
Please share sample qvw, it will help us to provide quick solution.
Regards,
Sreeni
Hi Marcus,
Can you explain with a simple example please?