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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
dijitald
Microsoft Employee
Microsoft Employee

Incorrect Total on custom PowerBI Measure

I'm struggling trying to get my Total correct for my custom Measure in Power BI. I've seen the postings for the solution using SUMX, and I've gotten a lot further, but still stumped. When I'm using the SUMX function, my TOTAL is exactly double what it should be. Here is the code:

 

Measure 3 = 
IF(ISFILTERED('Milestone'[ID]),
    IF(NOT(ISBLANK(CALCULATE(MAX('Milestone'[Estimated Date])))),
        IF(SELECTEDVALUE('Milestone'[Non Recurring]) = "Yes", 1, 2)
    ),
    SUMX(
        VALUES('Milestone'),
        IF('Milestone'[Non Recurring] = "Yes", 1, 2)
    )
)

 

The top portion of the ISFILTERED statement works fine for each of the individual items. However the TOTAL is always double.

Any help is greatly appreciated!

 

EDIT

I should mention that this measure is used on the Child table of a Parent/Child relationship on the form. So the list of Milestones is filtered, and correctly displayed in the Child table. Now I'm realizing that when i simplify the SUMX function to just contain 

SUMX('Milestone', 1)

I get exactly 2x the number of related Children. So if there are 2 Milestones, the total will be 4. If there are 6 Milestones, the total will be 12. So for some reason, it seems to be iterating over the collection twice? 

I'm stumped...

 

 

2 REPLIES 2
PijushRoy
Super User
Super User

Hi @dijitald 

Please share sample data




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Unfortunately, this is sensitive data and i can't share. I did create a simple sample, but it doesn't exhibit the same issue so i can't reproduce this. Not sure what that means for my dataset. I did add some more details above so let me know if you have any ideas!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors