Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Can anyone explain me what is the below code doing
if(Cashflow_Amount<0,'#,##,##,##0;(#,##,##,##0)','#,##,##,##0;#,##,##,##0')
Regards,
keerthi KS
I assume that this is a fragment of an expression. It returns a format string; selecting the first at the total row if the Cashflow_Amount is negative.
However, I suspect that it does not work because the naked* field Cashflow_Amount probably cannot evaluate at a total level; so the condition will always be false, and it will always return the "else" condition.
* a field without an aggregation function like Sum(), Avg(), Min()....
It's just formatting the numbers based on the Dimension.
Here, Dimensionality()=0 refers to First Dimension of the Pivot Table.
So when you do collapse all to First Dimension and (Dimensionality()=0 and Cashflow_Amount<0) condition satisfied then format the number as '#,##,##,##0;(#,##,##,##0)' and when you do expand all format the number as '#,##,##,##0;#,##,##,##0'
Oh ok.
Here if the format is '#,##,##,##0;(#,##,##,##0) then negative values comes within braces else number right