Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
In straight table, in Total Mode option -> For Addition there is SUM option but For Subtract what i need to select ?
Please help.
Thanks.
Subtract is not an aggregation function. So it's not an option that can be used for the Total Mode. You'll have to find some other way to calculate what you want. Perhaps you can add a factor field ( with 1 and -1 values) to your fact table in the script. That way you can multiply the value with the factor and then sum the results.
Hi Girish,
You can use Dimensionality function to calculate your own formula on totals.
Dimensionality = 0 is the total value on straight table.
If(Dimensionality()=0, -Sum(1),Sum(1))
Regards!!
Thanks for your reply.
Can you please explain how to use this function ?
Hi Girish,
Total mode must be Expression Total, and your expressión must be like this:
IF(Dimensionality() = 0, YourExpressionForTotalSusbtract, YourExpressionForSumOnEachDimensionValue)
Dimensionality function returns the number of dimension columns that have non-aggregation content. i.e. do not contain partial sums or collapsed aggregates.
A typical use is in attribute expressions, when you want to apply different cell formatting depending on aggregation level of data.
This function is only available in charts. For all chart types except pivot table it will return the number of dimensions in all rows except the total, which will be 0.
Regards!!