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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
PSB
Helper III
Helper III

Compare two cells using DAX or Power Query

I want to check if all values in Souce column exist in Target Column.

If I can get True or False, it's good. 

If I can get Exact value that's missing, it's better.

 

Cell_IdSourceTargetCheck Source in Target?Check Source in Target?
KNJ01002A11389090,507870,520110,126490389090,126490,505950,520110FALSEMissing 507870
KNJ01002A21389090,507870,126490,520110389090,126490,505950,520110FALSEMissing 507870
KNJ01002A31389090,507870,126490,520110389090,126490,505950,520110FALSEMissing 507870
ANJ01002A11389090,507870,505950,520110,126490389090,126490,505950,520110FALSEMissing 507870
ANJ01002A21389090,507870,505950,520110,126490389090,126490,505950,520110FALSEMissing 507870
ANJ01002A31389090,507870,505950,520110,126490389090,126490,505950,520110FALSEMissing 507870
ANJ01002A12505950,520110389090,126490,505950,520110TRUEAll Exist
ANJ01002A22505950,520110389090,126490,505950,520110TRUEAll Exist
ANJ01002A32505950,520110389090,126490,505950,520110TRUEAll Exist

 

PSB_0-1673713352211.png

 

 

 

 

2 ACCEPTED SOLUTIONS

your solution worked perfectly. Can't thank you enough for your help.

Only thing I need is "," between the result like shown below. 

 

Actual Result:  Missing 126490389090

Result I need:  Missing 126490,389090

View solution in original post

Hi @PSB 

I updated the link yesterday to reflect the changes to CONCATENATEX's delimiter.

I hope it works for you.

View solution in original post

5 REPLIES 5
grantsamborn
Solution Sage
Solution Sage

Hi @PSB 

I made a couple of transformations in Power Query:

- separate Source from Target

- unpivot both tables

- create DimCell

After that, there is a single measure to concatenate any values that weren't found.

Let me know if this works.

 

(edited to change link - I forgot the delimiter in CONCATENATEX.)

https://1drv.ms/u/s!AnF6rI36HAVkhPIcSilVrS2tpNBEQg?e=ApDvy6

 

your solution worked perfectly. Can't thank you enough for your help.

Only thing I need is "," between the result like shown below. 

 

Actual Result:  Missing 126490389090

Result I need:  Missing 126490,389090

Hi @PSB 

I updated the link yesterday to reflect the changes to CONCATENATEX's delimiter.

I hope it works for you.

PSB
Helper III
Helper III

I want to flag as true even if source is "123-234" and Target is "012-123-234-013"

Idrissshatila
Super User
Super User

Hello @PSB ,

 

You could add a calculated column with the following measure 

 

Check Source in Target = IF('Table'[Source] = 'Table'[Target], "True","false")
 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.