Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Guppi
New Member

Incorrect Grand Total In Power Pivot

Hi, guys. I'm having difficulties about this grand totals. I have a pivot table like this down below. 

 

DC/UnitCustomer GroupActual Maret 2024Price1
ARMABC5.564.000,00200.000,00
 CV. MAS AGUNG2.670.000,00 
 CV. SANTOSA JAYA15.590.000,00900.000,00
 CV. TRI JAYA4.920.000,00 
 HANAN FITRIA6.064.000,00200.000,00
 INDRA HARYO22.300.000,001,00
 MAS AGUNG SUKUN768.000,00 
 ORBIT JAYA9.000.000,00200.000,00
 PELANGI MEUBEL - DAMPIT1.500.000,00 
 PT. PURWA ASRI LESTARI937.000,00 
 RAMA MOJOKERTO760.000,00 
 RAMAH JAYA26.380.000,001,00
 SUMBER TEKNIK6.000.000,00200.000,00
 TK. FARIDA JAYA PLASTIK13.100.000,00500.000,00
 TK. HOO6.624.000,00200.000,00
 TK. MEGA JAYA ELEKTRONIK5.700.000,00200.000,00
 TK. MORO SENENG4.900.000,00 
 TK. PLASTIK LANCAR JAYA7.112.000,00200.000,00
 TK. SUMBER JAYA 2 - MAGERSARI12.679.000,00500.000,00
 UNTUNG BERSAMA11.160.000,00500.000,00
 WINNERS5.802.000,00200.000,00
ARM Total169.530.000,0012,00

 

This pivot table is created using 4 tables: DIMDATE, SALES, HADIAH, and STORE.

The DIMDATE[DATE] column has one to many relationship with SALES[DATE] column,
STORE[CODE] column has one to many relationship with SALES[CUSTOMER CODE] column,

HADIAH[TARGET] column also has one to many relationship with STORE[TARGET] column

 

The Actual Maret 2024 column is created using a simple measure like this:

CALCULATE([SUM OF NETTO]; DIMDATE[MONTH NAME] = "MAR")

So far, this column grand total is correct.

Then I created a Price1 column using this measure:

VAR ACTUAL = [Actual Maret 2024]

 

VAR AMACTH =

LOOKUPVALUE(

HADIAH[TARGET];

HADIAH[TARGET]; CALCULATE(MAX(HADIAH[TARGET]); HADIAH[TARGET] <= ACTUAL))

 

VAR APRICE =

LOOKUPVALUE(

HADIAH[HADIAH];

HADIAH[TARGET];

AMATCH)

 

RETURN

APRICE

 

So basicly this measure calculate if the HADIAH[TARGET] column is less than ACTUAL MARET 2024 then return the coresponding HADIAH[HADIAH] column.

 

The HADIAH table is like this:

TargetHadiah
5.000.000,00200.000,00
10.000.000,00500.000,00
15.000.000,00900.000,00
20.000.000,001,00
35.000.000,002,00
50.000.000,003,50
75.000.000,005,50
150.000.000,0012,00
250.000.000,0022,00

 

I also have tried this measure:

 

VAR ACTUAL = [Actual Maret 2024]

 

VAR AMACTH =

LOOKUPVALUE(

HADIAH[TARGET];

HADIAH[TARGET]; CALCULATE(MAX(HADIAH[TARGET]); HADIAH[TARGET] <= ACTUAL))

 

VAR APRICE =

LOOKUPVALUE(

HADIAH[HADIAH];

HADIAH[TARGET];

AMATCH)

 

RETURN
SUMX(
        SUMMARIZE(

        STORE;

        STORE[DC/UNIT];

        STORE[CUSTOMER GROUP];

        "TOTAL";

         APRICE);

         [TOTAL]

         )

but the grand total is also incorrect, too much incorrect.

 

The Price1 column grand total should be = 4.000.002

 

Where am I doing wrong?

I hope I provide enough data, so you guys can help me out. Many thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Guppi,

It seems like a common measure total issue when you use measure expression to calculate with multiple aggregations, you can take a look at the Greg’s blog to know how to handle this scenario:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @Guppi,

It seems like a common measure total issue when you use measure expression to calculate with multiple aggregations, you can take a look at the Greg’s blog to know how to handle this scenario:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.