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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.