cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
mahsan_ojaghian
Frequent Visitor

create a measure that converts negative values to zero

Hi Guys.

I'm really Confused!!!

I have a table like this:

ITEM_CODENEEDINVENTORY_QTYMISS_0
ITM_11005050
ITM_220010190
ITM_335100

-65

I want to create a measure that converts negative values to zero.

I need to sum of [MISS_0] column in a cart and it should show 240 not 175.

and I need to use measure and not calculate column because I have other filters that using of calculate column does'nt helpful.

Now my solution is using filter on this visual(Table) that filters Positive values but this way can't help me cause we cant filter measure with single value in a Cart.

I need a measure just sum positives or in the best way converts to zero.

Thanks.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi  @mahsan_ojaghian ,

 

Try the following measure:

Only Positive = SUMX( FILTER(Table, Table[Miss_0] > 0), Table[Miss_0])

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi  @mahsan_ojaghian ,

 

Try the following measure:

Only Positive = SUMX( FILTER(Table, Table[Miss_0] > 0), Table[Miss_0])

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors