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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Maintenance Revenue to exclude ......

From the code below my goal is to exclude "Grip" and "RH RECURE DATABASE SERVICE" from Maint_Revenue column
 
This is the slice of code that needs to be updated to  exclude Grip and RH RECURE DATABASE SERVICE
I have applied "||" as the logical operator to create an OR condition which may not be right.
What's would be the best way to write this code.
 
"Maint_Revenue", IF(NOT(LEFT(Contract_Items[QT Package],4)="Grip" || "RH RECURE DATABASE SERVICE"), Contract_Items[Price Monthly], 0),

 

 

1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

Hi @Anonymous -

 

Try this

 

Maint_Revenue =
IF (
    NOT ( LEFT ( Contract_Items[QT Package], 4 ) = "Grip" ) &&
      NOT ( Contract_Items[QT Package] = "RH RECURE DATABASE SERVICE" ),
    Contract_Items[Price Monthly],
    0
)

 

Hope this helps

David 

View solution in original post

2 REPLIES 2
dedelman_clng
Community Champion
Community Champion

Hi @Anonymous -

 

Try this

 

Maint_Revenue =
IF (
    NOT ( LEFT ( Contract_Items[QT Package], 4 ) = "Grip" ) &&
      NOT ( Contract_Items[QT Package] = "RH RECURE DATABASE SERVICE" ),
    Contract_Items[Price Monthly],
    0
)

 

Hope this helps

David 

Anonymous
Not applicable

Thanks David.  It was very helpful.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.