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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

IF/OR Results

Hello everyone...
 
I'm trying to create a calculated column I can use as a slicer to filter projects that have a budget minus forecast variance of -5 or greater (i.e. -6, -7, -8 too) OR greater than 5. I'm using the expression below but it's returning rows with values in between. 
Does anything jump out as something that needs to be tweaked in the below expression?
  
Change Required = IF(OR('Table'[Budget] - 'Table'[Forecast] < -5,'Table'[Budget] - 'Table'[Forecast] > 5),"Yes","No")
 
Thanks in advance to anyone who can assist.
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

the statement seems good. maybe just a little tuning like

Change Required = 
var _diff = 'Table'[Budget] - 'Table'[Forecast]
RETURN
IF(ABS(_diff) > 5),"Yes","No")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

the statement seems good. maybe just a little tuning like

Change Required = 
var _diff = 'Table'[Budget] - 'Table'[Forecast]
RETURN
IF(ABS(_diff) > 5),"Yes","No")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

I like that much better and it's working. Thank you @az38 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors