Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a pivot table and some values as shown below. I have made Show Particial Sum from Presentation tab.
But ifit is possible, I want to not sum if value is zero at Sum2.
So My Total sum at Sum1 must be 1200, not 1500.
Is it possible? Could you please help me.
Thank you in advance.
Fatih,
Best Regards.
Hi Faith,
You have to write this formula in following way
Dimension:- a
Expression 1(Sum1):- If(Dimensionality() = 0, Sum({<a = {"=Sum(Sum2) <> 0"}>} Sum1), Sum(Sum1))
Expression 2(Sum2):- sum(Sum2)
Please find attached QVW for more details.
Thanks,
May be like this
If(Dimensionality() = 0, Sum({<a = {"=Sum(Sum2) <> 0"}>} Sum1), Sum(Sum1))
Thank you Sunny,
But where can I write this formula? I have written to the Expression but it is wrong as below.
Hi Faith,
You have to write this formula in following way
Dimension:- a
Expression 1(Sum1):- If(Dimensionality() = 0, Sum({<a = {"=Sum(Sum2) <> 0"}>} Sum1), Sum(Sum1))
Expression 2(Sum2):- sum(Sum2)
Please find attached QVW for more details.
Thanks,
Take Dimension as a and Use Expression for
Dim
a
Expressions
Sum1 -- If(Dimensionality() = 0, Sum({<a = {"=Sum(Sum2) <> 0"}>} Sum1), Sum(Sum1))
Sum2 -- Sum(Sum2)
And check, It seems this
Hi Faith,
Above formula will give you following result:
a | Sum1 | Sum2 |
---|---|---|
A | 650 | 30 |
B | 300 | 0 |
C | 200 | 10 |
D | 350 | 20 |
Total | 1200 | 60 |
Thanks,
Thank you all of you. It works. Well-done