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

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

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Struggling to display correct Total using Measures

Hi community,

 

(I revised this post (from yesterday's original) to be more simpler).

 

I have uploaded revised PBIX file here.

 

I also uploaded underlying dataset here.

 

Currently, total for "FrcstWtdScore" is displaying 65 instead of 105.

JustinDoh1_0-1761167432003.png

 

Bottom is detail of that measure:

 

FrcstWtdScore =
IF  (  vw_NH_HealthCitations_NM[FrcstMths] < 13 && ( vw_NH_HealthCitations_NM[Standard Deficiency_M] = "0" ) ,  
        sumx (
             values(vw_NH_HealthCitations_NM),
            [FrcstPointsAdj] * (0.75)
            ),
 
        sumx (
              values(vw_NH_HealthCitations_NM),
              [FrcstPointsAdj] * (0.25)
        )    
     )

 

When you add the total of each row on a csv file dataset (using SUM), it is 105, and that is what I am trying to get as a result.

JustinDoh1_0-1761167662211.png

 

 

 

I am not sure what the logic of getting 65 is.  If anyone tell me how 65 got calculated, I would appreciate it.

 

Thank you for help!

1 ACCEPTED SOLUTION

Hi @JustinDoh1 ,

This isn’t really a limitation of Power BI, it’s just how DAX calculates things differently for individual rows versus totals. Each row looks at only that row’s data, while the total row looks at all the rows together, which is why the numbers can sometimes seem off. When I mentioned “multiple column values,” I meant that if your measure uses more than one column, Power BI may not know which value to pick for each row unless the calculation is written explicitly. A simple way to handle this is to use SUMX to calculate values row by row and HASONEVALUE if you need to treat totals differently. Doing this ensures that both the row-level values and the totals display correctly.

 

View solution in original post

7 REPLIES 7
v-sshirivolu
Community Support
Community Support

Hi @JustinDoh1 ,
Thanks for reaching out to Fabric community Forum.
I have replicated this scenario on my end using sample data with the columns: ProviderID, FrcstMths, Standard Deficiency_M, FrcstPointsAdj.
Below is an solution that ensures correct calculations at both the row and total levels:

FrcstWtdScore =
IF (
    SELECTEDVALUE(vw_NH_HealthCitations_NM[FrcstMths]) < 13 &&
    SELECTEDVALUE(vw_NH_HealthCitations_NM[Standard Deficiency_M]) = 0,
    SUM(vw_NH_HealthCitations_NM[FrcstPointsAdj]) * 0.75,
    SUM(vw_NH_HealthCitations_NM[FrcstPointsAdj]) * 0.25
)

 

Forecast C2/3 Wtd Issue =
IF (
    HASONEVALUE(vw_NH_HealthCitations_NM[ProviderID]),
    [FrcstWtdScore],
    SUMX (
        VALUES(vw_NH_HealthCitations_NM[ProviderID]),
        CALCULATE([FrcstWtdScore])
    )
)

vsshirivolu_0-1761134772883.png

Thank you.

@v-sshirivolu Thank you for your help.

 

Sorry. I revised the original post to be more simple.

Can you please try using my PBIX file attached (instead of using sample data)?

Thanks.

Hi @JustinDoh1 ,

The original total was 65.00 because the IF condition in the measure failed in the Grand Total (due to multiple column values), causing the logic to default to the 0.25 multiplier on all 260 points.

The fix was a Single Robust SUMX Measure that forced the calculation to evaluate row-by-row, bypassing the context issue.

 

FrcstWtdScore =

SUMX(

    vw_NH_HealthCitations_NM,  

    VAR FrcstMths = vw_NH_HealthCitations_NM[FrcstMths 3h]

    VAR FrcstPoints = vw_NH_HealthCitations_NM[FrcstPointsAdj 3j]

    RETURN

        IF(

            FrcstMths = 12

            FrcstPoints * 0.75,

            FrcstPoints * 0.25

        )

)

This measure also corrected the business logic by using the FrcstMths = 12 criteria to isolate the 80 points required for the 0.75 multiplier, resulting in the correct total of 105.00.

 
Please find the attached .pbix file for your reference.

@v-sshirivolu Thank you for your help.

Is this some limitation of PowerBI? I am still trying to understand what you meant by "multiple column values". When you say "context issue", can you elaborate little bit please?

Hi @JustinDoh1 ,

This isn’t really a limitation of Power BI, it’s just how DAX calculates things differently for individual rows versus totals. Each row looks at only that row’s data, while the total row looks at all the rows together, which is why the numbers can sometimes seem off. When I mentioned “multiple column values,” I meant that if your measure uses more than one column, Power BI may not know which value to pick for each row unless the calculation is written explicitly. A simple way to handle this is to use SUMX to calculate values row by row and HASONEVALUE if you need to treat totals differently. Doing this ensures that both the row-level values and the totals display correctly.

 

Praful_Potphode
Resolver III
Resolver III

Hi @JustinDoh1 ,

There are a lot of nested measures being used here in the pbix.my advice to you will be to create a card visual and put the first base measure on which all conditions are written and then from there investigate the value.if the base measure will come proper, the number will come correct.

 

Thanks and Regards,

Praful

@Praful_Potphode

Thank you for your comment.

I revised the original post to be more simple version.

Can you please try using my PBIX file attached?

Thanks.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.