cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper I

## IF Function with 2 Conditions and 2 Type

Hi All,

 No. of RSO Sent Ageing - JO IN to RSO (days) 4 NO DATA 4 6 2 1 2 2 2 2 1 3 1 3 1 NO DATA

I tried to create a measure that meets the following conditions: 3 RSO Sent Within 3 Working Days

So I used the following formula:

3 RSO Sent in 3 Days = if(VALUE(Tracker[Ageing - JO IN to RSO])<=3 && VALUE(Tracker[No. of RSO Sent])>=3,"Yes","No")

But it resulted in the following error:

Please advise on the correct formula. Thanks a lot.

Sya

1 ACCEPTED SOLUTION
Super User

Hi @sya

You can create a calculated column to get you the output you're after:

`Column = SWITCH (     TRUE () ,        'Table'[Ageing - JO IN to RSO (days)] = "NO DATA" , BLANK() ,        VALUE ( 'Table'[No. of RSO Sent] ) >= 3 && VALUE ( 'Table'[Ageing - JO IN to RSO (days)] ) <= 3 , "Yes" ,         "No" )`

Attached is a PBIX file to assist.

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

5 REPLIES 5
Super User

Hi @sya

Slightly modify your measure to the following:

3 RSO Sent in 3 Days = IFERROR ( IF ( VALUE Tracker[Ageing - JO IN to RSO] ) <= 3 && VALUE Tracker [No. of RSO Sent] ) >= "Yes" "No" ) , 0 )

So all you are doing is wrapping your existing measure with IFERROR ( [existing measure] , 0 ) which says if there's an error, then just return a 0. If you want it to be blank, then just change the 0 to BLANK() like below:

3 RSO Sent in 3 Days = IFERROR ( IF ( VALUE Tracker[Ageing - JO IN to RSO] ) <= 3 && VALUE Tracker [No. of RSO Sent] ) >= "Yes" "No" ) , BLANK() )

Hope this helps!

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Helper I

Hi Theo,

I tried the formula that u shared but it results in the following:

And the formula doesn't suggest columns that are already in the table, but only suggested my other created measures to be in the formula.

Sya

Super User

Hi @sya

You can create a calculated column to get you the output you're after:

`Column = SWITCH (     TRUE () ,        'Table'[Ageing - JO IN to RSO (days)] = "NO DATA" , BLANK() ,        VALUE ( 'Table'[No. of RSO Sent] ) >= 3 && VALUE ( 'Table'[Ageing - JO IN to RSO (days)] ) <= 3 , "Yes" ,         "No" )`

Attached is a PBIX file to assist.

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Helper I

It's working! Thanks a lot, Theo. You rock! 🙂

Super User

Nothing at all @sya! A pleasure.

All the best with you BI journey mate!

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors