Forum Discussion
QA comparicion between Values
- Anonymous3 years ago
Hi PedroPascual ,
We can create a calculated column.
QA = IF ( AND ( AND ( 'Table'[Column1] = "House", 'Table'[Column2] = "cat" || 'Table'[Column2] = "dog" || 'Table'[Column2] = "rabbit" || 'Table'[Column2] = "lion" ), 'Table'[Column3] = "book" || 'Table'[Column3] = "pencil" ), "YES", "NO" )Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous, thanks very much for your reply. your response is correct.
however, I did wrong my proposal.
Let me re-formulate the issue I have, a little bit more clear.
the conditional value shall be based in at least 3 conditional values:
the value "house" from Column1 must contain in column2 "cat" and/or "dog" and/or "rabbit" and/or "lion" and in column3 "book" and/or "pencil" otherwise is NO;
| Column1 | Column2 | Column3 | QA |
| House | cat | book | YES |
| House | dog | book | YES |
| House | cat | pencil | YES |
| House | dog | pencil | YES |
| House | rabbit | window | NO |
| House | lion | door | NO |
and it could be a possibility that a fourth column with another rule will be used.
it is clear??
thanks in advance
Hi PedroPascual ,
We can create a calculated column.
QA =
IF (
AND (
AND (
'Table'[Column1] = "House",
'Table'[Column2] = "cat"
|| 'Table'[Column2] = "dog"
|| 'Table'[Column2] = "rabbit"
|| 'Table'[Column2] = "lion"
),
'Table'[Column3] = "book"
|| 'Table'[Column3] = "pencil"
),
"YES",
"NO"
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- PedroPascual3 years agoHelper I
Anonymous Wonderful. it is working properly. thanks.
last question, what about if I have information in different tables??
does not work.
QA =
IF (
AND (
AND (
'Table1'[Column1] = "House",
'Table2'[Column2] = "cat"
|| 'Table2'[Column2] = "dog"
|| 'Table2'[Column2] = "rabbit"
|| 'Table2'[Column2] = "lion"
),
'Table1'[Column3] = "book"
|| 'Table1'[Column3] = "pencil"
),
"YES",
"NO"
)- Anonymous3 years agoNot applicable
Hi PedroPascual ,
If he is in different tables, refer to Message 4, click on "Transform Data" to access the Power Query, add index columns for each table, and merge them into one table.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.