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
mea
New Member

Positive, negative totals in a separate cards

Hi, 

 

I have summary table with totals by clients

Client, Total

Client 1, 100

Client 2, -250

Client 3,  50 

 

Total is a measure that takes in to account different busines logics. 

 

How to create measure, that shows only positive total measure values by client dimension

 

So, I would be able to have two seperate cards: 

Card 1: Client 1 + Client 3 = 150 (so total for positive clients)

Card 2: Client 2 = - 250 (so total for negative clients) 

 

Currently pulling Total measure into cards, it results in net Total, so = 100

 

Thanks! 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Ok. In that case, try creating measures equivalent to:

+ve values =
VAR _table =
    ADDCOLUMNS ( VALUES ( 'Table'[Client] ), "_Value", [Sum Value] )
RETURN
    CALCULATE ( [Sum Value], FILTER ( _table, [_Value] > 0 ) )
-ve values =
VAR _table =
    ADDCOLUMNS ( VALUES ( 'Table'[Client] ), "_Value", [Sum Value] )
RETURN
    CALCULATE ( [Sum Value], FILTER ( _table, [_Value] < 0 ) )

+- values.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

5 REPLIES 5
PaulDBrown
Community Champion
Community Champion

Create measures for each group of values to use in the card visuals using the equivalent to the following (in my example, the base measure is a simple SUM, but use your own measure:

+ve values =
CALCULATE ( [Sum Value], FILTER ( 'Table', [Sum Value] > 0 ) )
-ve values = 
CALCULATE([Sum Value], FILTER('Table', [Sum Value] <0))

to get:

+- values.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Summary table is a visual "table", not an actual table

 

Actual table:

Client 1, Asset 1, 200

Client 1 Asset 2, -100

Client 2, Asset 1, 500

Client 2, Asset 2, -750

Client 3, Asset 1, 50

 

So I cannot sum values by "is value>0 or <0."

I need to sum them by client dimension.

Positive amount = If on client level amount is > 0 then amount else 0

PaulDBrown
Community Champion
Community Champion

Ok. In that case, try creating measures equivalent to:

+ve values =
VAR _table =
    ADDCOLUMNS ( VALUES ( 'Table'[Client] ), "_Value", [Sum Value] )
RETURN
    CALCULATE ( [Sum Value], FILTER ( _table, [_Value] > 0 ) )
-ve values =
VAR _table =
    ADDCOLUMNS ( VALUES ( 'Table'[Client] ), "_Value", [Sum Value] )
RETURN
    CALCULATE ( [Sum Value], FILTER ( _table, [_Value] < 0 ) )

+- values.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Worked! Thanks a lot! Cheers! 

mh2587
Super User
Super User

Negative = if(total <=0,total)


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



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
Top Kudoed Authors