Forum Discussion
Issue with Summarize in Power Pivot
- 3 years ago
Ackbar-Learner
Sorry I got distracted with some other business.
Please use the following for measure 22nd Measure: = SUMX ( VALUES ( TabPLGLItem[GLItem] ), [TaxAmountWithSign] )
Hi Ackbar-Learner
Would you please copy/paste the code of the four measures?
Sure tamerj1
1st Measure:
=VAR Result = [AmountWithSign]
VAR TaxApplicable = -1*if([TaxCalcCumulative]>[TaxCalcPeriod],[TaxCalcPeriod],[TaxCalcCumulative])
RETURN
calculate(if(if(HASONEVALUE(TabPLGLItem[GLItem]),values(TabPLGLItem[GLItem]))="Tax",TaxApplicable,Result))
2nd Measure:
=VAR CorrectTotal = SUMMARIZE(TabPLGLItem,[GLItem],"__value",[TaxAmountWithSign])
RETURN
IF(HASONEVALUE(TabPLGLItem[GLItem]),[TaxAmountWithSign],SUMX(CorrectTotal,[__value]))
3rd Measure:
=if(
HASONEFILTER(TabPLGLItem[GLItem])
,
CALCULATE(
[PLTaxAmountWithSign]
,
ALL(TabPLGLItem[GLItem])
,
TabPLGLItem[Index] <= VALUES(TabPLGLItem[Index])
)
,
blank()
)
4th Measure:
=SWITCH(
[HeaderCalcType]
,
BLANK(),BLANK()
,
1,[TaxAmountWithSign]
,
2,[RunningTotal]
)
- tamerj13 years agoCommunity Champion
Ackbar-Learner
Sorry I got distracted with some other business.
Please use the following for measure 22nd Measure: = SUMX ( VALUES ( TabPLGLItem[GLItem] ), [TaxAmountWithSign] )- Ackbar-Learner3 years agoResolver I
This was so easy and I went to fetch it on the moon😃. Any clue why did the Summarize function not work?
Also, would you mind explaining what is actually the above function doing? This will be for the benefit of people who will read this afterwards and myself as well.
- tamerj13 years agoCommunity Champion
Ackbar-Learner
You were blanking out the total using HASONEVALUE which was absolutely unnecessary