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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SebastianPalom
New Member

Error in Sum and dont summarize in Tree map

I have a problem with a calculation, i have a column that has downtime minutes, the problem is that when the data is selected as "Sum", the downtime showed is 20, but when i select "dont summarize" it shows 10, there is no other row or extra data as if its combined.

And the Source data/ Database it shows only the 10 minutes, there is no input of 20 minutes
I can select the "dont summarize" option in the table visual, but i have some other graphics (a Treemap, bars) that shows the 20 minutes, how can i make so that the graphics shows only the 10 minutes?

SebastianPalom_0-1751646498161.pngSebastianPalom_1-1751646527304.png

 

8 REPLIES 8
SebastianPalom
New Member

Hi @rohit1991 and @v-mdharahman 
I tried the formula you two propose
The first column is the data as "Sum", the second column is the data as "Dont summarize", an the third is the formula of "Sumx"
The formula works in the rows, but in the total is completly wrong, and the data dont sum up, could you help me with this issue?

Also, the relationships with another table dont do any changes, i removed every relationship and the issue still continues

SebastianPalom_0-1751917770994.png

 

Hi @SebastianPalom ,

 

Power BI sometimes recalculates the totals across the whole set, not just adding up what you see in the rows.

 

This formula creates a virtual table with just one row per downtime label, finds the max downtime for each, and then sums those up. 

 

 

Total Downtime Fixed = 
SUMX(
    SUMMARIZE(
        YourTable,
        YourTable[Downtime-label],
        "MaxDowntime", MAX(YourTable[Downtime minutes])
    ),
    [MaxDowntime]
)

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi @SebastianPalom,

Thanks for following up with the conversation and providing screenshotw. You are right, the original formula using SUMX(VALUES(...)) gives the right values per row but fails at the total level by overcounting.

Here’s a better version of DAX that handles both the row-level and total-level correctly:

Total Downtime Fixed =
SUMX (
SUMMARIZE (
YourTable,
YourTable[Downtime-label],
"MaxDowntime", MAX ( YourTable[Downtime minutes] )
),
[MaxDowntime]
)

This will create a virtual table where each downtime label appears only once, calculates the max downtime per label, and then sums them, so no duplicates are counted, and the total is accurate.

 

Best Regards,

Hammad.

 

Hi @SebastianPalom,

As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.

If yes, you are welcome to share your workaround so that other users can benefit as well. And if you're still looking for guidance, feel free to give us an update, we’re here for you.

 

Best Regards,
Hammad.

Hi @SebastianPalom,
Hope everything’s going smoothly on your end. As we haven’t heard back from you, so I wanted to check if the issue got sorted.
Still stuck? No worries just drop us a message and we can jump back in on the issue.

 

Best Regards,

Hammad.

Hi @SebastianPalom,
We noticed there hasn’t been any recent activity on this thread. If your issue is resolved, marking the correct reply as a solution would be a big help to other community members. If you still need support, just reply here and we’ll pick it up from where we left off.

 

Best Regards,

Hammad.

v-mdharahman
Community Support
Community Support

Hi @SebastianPalom,

Thanks for reaching out to the Microsoft fabric community forum.

Based on what you've described and the images you've attached, it sounds like the issue is due to how the data is being aggregated in the visual specifically, it’s likely counting the same row multiple times due to a relationship in your data model.

This often happens when your table joins to another table using a many-to-one or many-to-many relationship, which can cause row duplication behind the scenes in visuals like Treemaps or bar charts even though the source data itself looks correct.

Here’s a way to handle it so that each row’s downtime is only counted once, no matter what kind of visual you use

creating a measure like this:

Total Downtime = SUMX(VALUES(YourTable[UniqueRowID]), MAX(YourTable[DowntimeMinutes]))
Replace YourTable[UniqueRowID] with a column that uniquely identifies each row (like an ID or timestamp). If you don’t have one, try creating one using Power Query or DAX.

This approach uses SUMX over the distinct rows (ensured by VALUES), and for each row, it only takes the maximum downtime value which avoids double-counting due to duplicates introduced via relationships.

Also, I’d recommend checking the relationships in your model to confirm whether they might be causing row duplication. You can open Model view in Power BI and inspect the cardinality and cross-filter directions.

 

I would also take a moment to thank @rohit1991

, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.

rohit1991
Super User
Super User

Hi @SebastianPalom 

 

This issue is likely happening because your visual (like the Treemap) is aggregating the same row more than once, even if the source data shows only 10 minutes.

 

Could you please try below steps:

 

  • Double-check your data model – especially relationships. A many-to-one join or extra filter might be duplicating rows.

  • In your visuals, instead of using a basic sum, try this measure to count downtime per unique row:

 

Total Downtime = SUMX(VALUES(Table[ID]), MAX(Table[DowntimeMinutes]))

 

This makes sure each row is only counted once, no matter the visual.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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