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
ashmitp869
Helper II
Helper II

Dax calculation help required when comparing two columns from two different tables with no relation?

Hi, 

I've 2 tables with no relationship between them, I would like to create a measure to add one column Qualified in table DSR by checking the Skill Level and Skill Qualified.

 

DSR and Qualifications  is M:M relationship

 

ashmitp869_3-1715922534270.png

 

 

 

 

Output result will be like below image

ashmitp869_1-1715922284250.png

 

Created a calculated columns but not working

 

 

 

Qualified = 
VAR __Dkey = SELECTEDVALUE(DSR_DNQ[Key]) 
VAR __Qkey = SELECTEDVALUE(Qualifications[Key]) 
VAR _SL = SELECTEDVALUE(Qualifications[Skill Level])
VAR _SQ = SELECTEDVALUE(Qualifications[Skill Qualified])
VAR __RESULT =
   IF(__Dkey = __Qkey && _SL ="L",
        "Learner",IF(__Dkey = __Qkey && _SQ ="Q","Qualified","Not Qualified"))
        
RETURN
    __RESULT

 

 

Sample file : https://github.com/suvechha/samplepbi/blob/main/samplefile1.pbix

Thanks

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @ashmitp869 ,

I opened your .pbix file and created a calculated column.

Qualified =
IF (
    'DSR_DNQ'[Key] = "OBRIJA-8",
    "Learner",
    IF ( 'DSR_DNQ'[Key] = "OBRIJA-1", "Qualified", "Not Qualified" )
)

Then I think you can get what you want.

vyilongmsft_0-1716169463174.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yilong-msft
Community Support
Community Support

Hi @ashmitp869 ,

I opened your .pbix file and created a calculated column.

Qualified =
IF (
    'DSR_DNQ'[Key] = "OBRIJA-8",
    "Learner",
    IF ( 'DSR_DNQ'[Key] = "OBRIJA-1", "Qualified", "Not Qualified" )
)

Then I think you can get what you want.

vyilongmsft_0-1716169463174.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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