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
Google5ive
Frequent Visitor

DAX 'If' statement with 'or' conditions

What if you have a multiples tables that need produce a Sum only if they have a value above 0 for example and I know this code isnt correct but im trying to explain

 

Calculate( Sum(
if Column 1 > 0,

if Column 2 > 0,

if Column 3 > 0)

 

 

How would I write something in the proper format in DAX

 

since i cant use if statements

 

This is what im trying to convert into DAX

 

SUM(iif((Fields.ADDTL_INST > 0
Or Fields.ADDTL_REF > 0
Or Fields.EXCISE_TAX > 0
Or Fields.RECORDING_FEES > 0
Or Fields.NON_STANDARD_FEES > 0)

2 REPLIES 2
MahyarTF
Memorable Member
Memorable Member

Hi,

You could use Or( , ) Dax function or use || symbol that used for or condition in DAX

Appreciate for Kudos

Mahyartf

MahyarTF_0-1660185367043.png

Mahyartf

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.