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
sovereignauto
Helper III
Helper III

MAX of Logic or zero

Afternoon,

 

So i am trying to convert an Excel sheet to Powerbi.

 

I have a formular that uses MAX for max([logic calculation],0) so if the calculation is less that zero it will equal zero.

 

How would i do this in powerBI? 

 

The calculation is [date 1]-[date 2] i have created a column with this in already but now not sure what to do! 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

In your column you could do

Column = 
VAR _calc = [date 1]-[date 2]
RETURN
IF ( _calc < 0, 0, _calc )

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

In your column you could do

Column = 
VAR _calc = [date 1]-[date 2]
RETURN
IF ( _calc < 0, 0, _calc )

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.