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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate Sum of one column

Hello

 

I have a report which needs total for one amount column.when I select sum by right clicking on the column name,its giving me wrong result.
Sum for this is $3109.01

PavaniD_0-1712319493071.png

But im getting this

PavaniD_1-1712319581731.png

 

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous 

 

Thanks for the reply from @Anonymous , please allow me to provide another insight:
First of all, I create a set of sample:

vzhengdxumsft_0-1712540947681.png

You can use the if() and Hasonevalue() function to calculate the total separately:

MEASURE =
IF (
    HASONEVALUE ( 'Table'[ID] ),
    SUM ( 'Table'[Value] ),
    IF (
        SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Value] ) > 0,
        SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Value] ),
        0
    )
)

 The result is as follow:

vzhengdxumsft_1-1712541077344.pngvzhengdxumsft_2-1712541088510.png

When the sum of the value less than 0 then return 0.

 

Best Regards

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

Anonymous
Not applicable

Its still the same.sum of current amount is the measure i used that you suggested.

PavaniD_0-1712746705002.png

 

Anonymous
Not applicable

Hi @Anonymous 

 

Could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

Best Regards

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

Anonymous
Not applicable

I tried the above measure.But Im getting wrong result.

PavaniD_0-1712322431670.png

Here ($1,126.98) is actually "-$1,126.98" negative amount.So the ressult must be 0.

Anonymous
Not applicable

Do not right-click and select sum.
Create an explicit measure Sum Current Amt = SUM(<tablename'>Current Amt')
Please this measure, Sum Curent Amt, in the table with the attributes to sum.
You might even want to turn Auto Sum off on the columns in the model.

Explicit Vs Implicit DAX Measures in Power BI - RADACAD

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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