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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
medaxing
Frequent Visitor

Grand Totals Rows and Column Not Matching

Hi Guys,

 

Greetings!

 

Need your help.

Below is the example of the data. Unfortunately unable to figure out why the grand totals are not matching.

 

Name

2022-01

2022-02

2022-03

Total

P1

-308200

 

-39563

-65000

P2

-342529

-39563

 

-760000

P3

-442792

 

 

-389900

P3

-442792

-20000

-39563

-68000

Total

-200000

-45000

-30000

???

 

below is my dax:

 

measure_base =
if(calculate('T1'[MMM1],'T2'[L2]<>"Hire",'AU'[AU]="CDC"||'AU'[AU]="CDS")* [Cal_C]<
calculate('T1'[MMM1],'T2'[L2]<>"Hire",'AU'[AU]="CDC"||'AU'[AU]="CDS"),
calculate('T1'[MMM1],'T2'[L2]<>"Hire",'AU'[AU]="CDC"||'AU'[AU]="CDS"),
calculate('T1'[MMM1],'T2'[L2]<>"Hire",'AU'[AU]="CDC"||'AU'[AU]="CDS")* [Cal_C])

 

final_measure:
if(hasonefilter('Calendar'[Year and Month]),if(HASONEFILTER('V'[V Code]),
if([measure_base]<1,0,[measure_base]),
sumx(V,[measure_base])
))

 

Could you please help.

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @medaxing ,

 

Please try the following formula:

 

Measure = 
var total = 
    sumx (
        SUMMARIZE ( V, 'Calendar'[Year and Month], V[V Code], "base", [measure_base] ),
        [base]
    )
return
    if (
        hasonefilter ( 'Calendar'[Year and Month] ) && HASONEFILTER ( 'V'[V Code] ) ,
        if ( [measure_base] < 1, 0, [measure_base] ),
        total
    )

vkkfmsft_0-1643075114665.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @medaxing ,

 

Please try the following formula:

 

Measure = 
var total = 
    sumx (
        SUMMARIZE ( V, 'Calendar'[Year and Month], V[V Code], "base", [measure_base] ),
        [base]
    )
return
    if (
        hasonefilter ( 'Calendar'[Year and Month] ) && HASONEFILTER ( 'V'[V Code] ) ,
        if ( [measure_base] < 1, 0, [measure_base] ),
        total
    )

vkkfmsft_0-1643075114665.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.