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

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

Reply
steambucky
Helper III
Helper III

Seeking assistance with OR or switches....

 

I would like to create a calculcated column that equals 1 IF the feild I am checking contains <null> ( no data ) OR the text "as needed" 

 

I have made similar things with "switches" but cant seem to get to grips with this. I have been looking at CONTAINS but can't seem to get anything that works.

 

Something like : update_frequency = If(Sir[Frequency of updates]), “as needed”or ISBLANK,1) 0)

 

Any pointers or help would be most welcome.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @steambucky,

 

update_frequency =
IF (
    Sir[Frequency of updates] = BLANK ()
        || NOT ( ISERROR ( FIND ( "as needed", Sir[Frequency of updates] ) ) ),
    1,
    0
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @steambucky,

 

update_frequency =
IF (
    Sir[Frequency of updates] = BLANK ()
        || NOT ( ISERROR ( FIND ( "as needed", Sir[Frequency of updates] ) ) ),
    1,
    0
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
steambucky
Helper III
Helper III

This still doesnt work BUT is this closer? Any advice welcome.

 

update_frequency =

 

IF (

     (Sir[Frequency of updates]),ISBLANK, 1,

          IF((Sir[Frequency of updates]),’as needed’,1

0)

)

This isn't working yet but is this heading more the right direction? Any advice welcome 

 

update_frequency = If
(ISBLANK(Sir[3.2_Frequency of updates])
IF(Sir[3.2_Frequency of updates],"as needed",
1,0
))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.