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
Syndicate_Admin
Administrator
Administrator

Measure that sums only positive values in matrix

Hey there;

I have an issue, I need that the measure sums only the positive vales

vsgarciap_0-1616020970638.png

But when I use the switch statement to replane the negatives values with zero, works in the same way when sum the values

vsgarciap_1-1616021335632.png

What I need is the following result:

vsgarciap_2-1616021749522.png

I can't do it in a calculated colum because I'm using what-if parameter in the DAX formula.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Syndicate_Admin,[inven. Suggested] is a column

try a new measure

sumx(Table, if(Table[inven. Suggested] >0, Table[inven. Suggested] , blank()))

if [inven. Suggested] is a measure

sumx(values(Table[material]), if([inven. Suggested] >0, [inven. Suggested] , blank()))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Syndicate_Admin,[inven. Suggested] is a column

try a new measure

sumx(Table, if(Table[inven. Suggested] >0, Table[inven. Suggested] , blank()))

if [inven. Suggested] is a measure

sumx(values(Table[material]), if([inven. Suggested] >0, [inven. Suggested] , blank()))

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.