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
drivero
Helper I
Helper I

Measure to Isolate Negative values group by

Hi there!

 

I would like to Isolate the total value Group by Country which are negative in global:

 

drivero_1-1701356740914.png

 

In this case, like Italy's Total is negative, I would like to be shown as 0 and then the TOTAL should be 839578 + 25000 (because -25000 should be = 0)

I could visualize italy in total as 0, but still the total still containing the -25000

 

I attach a sample desktop project (https://we.tl/t-4JW0UHBxKN).

 

I need help, please. 

 

Thank you very much.

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

One approach is to check if country is in scope (false for the total line):

IF (
    ISINSCOPE ( DimCustomer[Country] ),
    [TotalAmount],
    SUMX ( VALUES ( DimCustomer[Country] ), [TotalAmount > 0] )
)

View solution in original post

3 REPLIES 3
drivero
Helper I
Helper I

Hi @AlexisOlson 

I achieve what I want:

 

IF (
    ISINSCOPE ( DimCustomer[Country] ),
    [TotalAmount > 0],
    SUMX ( VALUES ( DimCustomer[Country] ), [TotalAmount > 0] )
)

 

Thank you very much for your help 🙂 !!

AlexisOlson
Super User
Super User

One approach is to check if country is in scope (false for the total line):

IF (
    ISINSCOPE ( DimCustomer[Country] ),
    [TotalAmount],
    SUMX ( VALUES ( DimCustomer[Country] ), [TotalAmount > 0] )
)

@AlexisOlson 

 

Thanks!
Now, the total Amount is correct but I would like as well to show 0 the negative values in the visual (group by country)

Is it posible?

drivero_0-1701413911820.png

I would like to show Italy 0 but the total sum like the one measure you gave me 🙂

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