The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have been fighiting Power query for excel to try and find a way to compare and validate either of the scenerios below;
First, compare one cell which is full of comma seperated text values (Qualifications) to another cell of comma seperated text values (Neccesary Qualifications) then dispaying an "yes" or "no" in a new column (Meets Qualifications) if the first cell contains all the items in the other cell.
Second, compare one cell full of comma seperated text values (Qualifications) to an list (query with just a table of values) resulitng in either an "yes" or "no" in a new column confirming that the first cell contains all the items in the referenced list.
Qualifications | Neccesary Qualifications | Meets Qualifications |
MAGOMA,TWIC,MAGPLE,NUSCOU | MAGOMA,MAGPLE,NUSCOU | YES |
TWIC,MAGPLE,NUSCOU | MAGOMA,MAGPLE,NUSCOU | NO |
MAGPLE,NUSCOU,TWIC,PHIROC | NUSCOU,MAGPLE | YES |
Solved! Go to Solution.
Just add a custom column with the formula:
=if List.ContainsAll(Text.Split([Qualifications],","),Text.Split([Neccesary Qualifications],",")) then "Yes" else "No"
Just add a custom column with the formula:
=if List.ContainsAll(Text.Split([Qualifications],","),Text.Split([Neccesary Qualifications],",")) then "Yes" else "No"
I swear I tried that about a dozen times. That worked, THANK YOU!!