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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.