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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

My table is giving me wrong total

Hi, I am facing a weird problem in Power BI table visual. My table visual is giving me wrong total. I exported the same table into excel and it gives a different value. How can I correct this? 
Even if plot it for matrix visual it's giving me wrong total.

I have attached screenshots for both excel and power bi table visual for reference. 
 

SatishBadiger_1-1656057135063.png

 

SatishBadiger_0-1656057039965.png

 

Regards. Quick help is highly appreciated. 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Please try the following methods.

YTD =
IF (
    HASONEVALUE ( 'Table'[Department] ),
    SUM ( 'Table'[Amount] ),
    CALCULATE ( SUM ( 'Table'[Amount] ), ALL ( 'Table' ) )
)

vzhangti_0-1656396774699.png

 

Best Regards,

Community Support Team _Charlotte

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

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Please try the following methods.

YTD =
IF (
    HASONEVALUE ( 'Table'[Department] ),
    SUM ( 'Table'[Amount] ),
    CALCULATE ( SUM ( 'Table'[Amount] ), ALL ( 'Table' ) )
)

vzhangti_0-1656396774699.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Saap
Resolver III
Resolver III

Hi @Anonymous 

Please post your measure.

For now please check if this resolve your problem: https://community.powerbi.com/t5/Desktop/Incorrect-sum-calculated/m-p/325609

Anonymous
Not applicable

@Saap my measure is a simple: 
YTD Actuals = SUM('Table'[Amount])

 

Row Values are being displayed correctly there's issue only with the total. 

@Anonymous 

Please try the solution I posted in my previous post.
Or try to do something like this:

YTD Actuals =
SUMX(
VALUES(Table[Departament_2]),
SUM(Table[Amount])
)
Anonymous
Not applicable

SatishBadiger_0-1656067368086.png

@Saap Hi, it's giving even weird total when I use the DAX code that you provided. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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