Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have a expression that reads
num(if(sum(XYZ)<0, 0, Sum(XYZ)),'$(UnitFormat)')
This seems to be consuming a high calculation time on a large document.
Is there a single function that can be used to optimize this to the best?
Note: for certain reasons we do not want to mention the dimension when we are calculating this.
thanks,
Rajesh Vaswani
Hi,
Can you try below
if(sum(XYZ)<0, 0, num(Sum(XYZ),'$(UnitFormat)'))
Regards
ASHFAQ
You could try:
num(rangemax(0,Sum(XYZ)),'$(UnitFormat)')
Not sure if this will improve performance, but it may be worth a try.
Maybe you could use set analysis:
sum({< XYZ = {">0"}>} XYZ)
The units could you better show (dynamically) within the label.
- Marcus
Wouldn't you want to include negative values? Just because one of the values of XYZ is negative, doesn't mean the sum is below 0.
It will be depend from the data-structure. In some cases I use such logic. Maybe its worth to implement the sum-check within the set analysis but I think then will be the performance not really better ...
Perhaps another way could be to split these calculation in a table-chart with and reference i a second step on the other column.
- Marcus