cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to express an if function with multiple columns filtered

Hello Expert.

 

I try to do a logic but it resulted to syntax error. What I want is having a multiple columns to filter. So for example how to express this scenario.

If column A, B, C, D, E, F, G, H, I,J, K, L, M & N is false then "With Changes" if true " No Changes"

 

How can I express this formula without having an error and will work? Please advise.

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

@lottee

 
Hope you need a DAX solution?. Add the following Column to your table and modify the column names as required

Column = 
VAR T = {[A],[B],[C],[D]} RETURN
SWITCH( TRUE() ,
    CONTAINS(T,[Value],FALSE()), "With Changes",
    CONTAINS(T,[Value],TRUE()), "No Changes",
    "Unknown"
    )

Fowmy_0-1600606622644.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 



 

View solution in original post

4 REPLIES 4
Highlighted
Continued Contributor
Continued Contributor

Hi @lottee 

 

Can you share an example of the data and what you want it to look like?

Highlighted
Community Champion
Community Champion

@lottee

 
Hope you need a DAX solution?. Add the following Column to your table and modify the column names as required

Column = 
VAR T = {[A],[B],[C],[D]} RETURN
SWITCH( TRUE() ,
    CONTAINS(T,[Value],FALSE()), "With Changes",
    CONTAINS(T,[Value],TRUE()), "No Changes",
    "Unknown"
    )

Fowmy_0-1600606622644.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 



 

View solution in original post

Highlighted
Memorable Member
Memorable Member

hi @lottee - If the condition needs to check if ALL columns to be FALSE for the derived column to have the value "With Changes" then you can implement a logic as seen below. 

 

Status =
IF (
Sample_Data[Flag1] = FALSE() &&
Sample_Data[Flag2] = FALSE() &&
Sample_Data[Flag3] = FALSE() &&
Sample_Data[Flag4] = FALSE() &&
Sample_Data[Flag5] = FALSE(),
"With Changes",
"No Changes"
)
 

Sumanth_23_0-1600621025607.png

 

Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!

Highlighted

Thank you All for taking time to answer my questions and I've got the right formula from @Fowmy  Thank you for the help!

 

You all stay safe and thanks again

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors
Users online (665)