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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
astano05
Helper III
Helper III

Remove Negative Values only in January

I have created the below 2 measure which work as expected. 

 

MPG Sold YTD-LY Chg SUM = sumx(filter(Customer,[MPGs Sold YTD-LY Chg threshold]>0),[MPGs Sold YTD-LY Chg threshold])

New MPG Sold = [MPG Sold YTD-LY Chg SUM]-calculate([MPG Sold YTD-LY Chg SUM],dateadd('Calendar'[Date Value],-1,MONTH))

 

However, the issue is with January there are many negative values when comparing January to December of the previous year. How can i filter out only the negative values in the New MPG Sold measure

3 REPLIES 3
lbendlin
Super User
Super User

return BLANK() for negative results.

 

Return if([value]>0,[value])

lbendlin
Super User
Super User

use MAX(0,[value])  to suppress negative values.

This works to change the negative values to 0, but I want my measure to calculate only for positive outcomes. Using MAX, causes it to show 0 for all values 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.