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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jash_makadiya
Regular Visitor

Multiple AND and OR combination

Hello Everyone..

 

Can anyone guide me with this.. the below underlined are column name and i want to frame a power query for the same

 

If "learning centred teaching = completed" AND (course design = completed OR course design for constructive = completed)  AND practicum = completed AND (at least 2 other completes from one of the remaining columns: lecturing, leading effective discussions, utc_table, assessment, scholarship) THEN TRUE, else FALSE?

 

Thank you in advance.

2 ACCEPTED SOLUTIONS
BA_Pete
Super User
Super User

Hi @jash_makadiya ,

 

In Power Query if would be something like this. I'm assuming that if a field isn't completed, then it's null:

if [learning centred teaching] = "completed"
    and ([course design] = "completed" or [course design for constructive] = "completed")
    and [practicum] = "completed"
    and List.NonNullCount({[lecturing], [leading effective discussions], [utc_table], [assessment], [scholarship]}) >= 2
then "TRUE"
else "FALSE"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

I think @jash_makadiya is looking for "completed" rather than non-null.

 

Maybe change the last condition to

List.Count(
    List.Select(
        {[lecturing], [leading effective discussions], [utc_table], [assessment], [scholarship]},
        each _ = "completed"
    )
) >= 2

 

 

View solution in original post

6 REPLIES 6
BA_Pete
Super User
Super User

Hi @jash_makadiya ,

 

In Power Query if would be something like this. I'm assuming that if a field isn't completed, then it's null:

if [learning centred teaching] = "completed"
    and ([course design] = "completed" or [course design for constructive] = "completed")
    and [practicum] = "completed"
    and List.NonNullCount({[lecturing], [leading effective discussions], [utc_table], [assessment], [scholarship]}) >= 2
then "TRUE"
else "FALSE"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you for the solution.

I think @jash_makadiya is looking for "completed" rather than non-null.

 

Maybe change the last condition to

List.Count(
    List.Select(
        {[lecturing], [leading effective discussions], [utc_table], [assessment], [scholarship]},
        each _ = "completed"
    )
) >= 2

 

 

Thank you for the solution.

 

That's why I said I was assuming that if a field wasn't completed it was null. A non-null count on those columns would work fine in this scenario.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




jash_makadiya
Regular Visitor

@BA_Pete @wdx223_Daniel @AlexisOlson @ImkeF 

Hi Top Solution Authors, your help would be much appreciated.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors