Forum Discussion

marc_slater's avatar
marc_slater
New Member
3 years ago
Solved

Unable to get LOOKUPVALUE to work correctly

Hi, 

 

I am attempting to use LOOKUPVALUE as a VLOOKUP, as I cannot use merge, as I do not have unique identifiers.

 

I am new to DAX so I would like some guidance as to whether I am using the function correctly or how I could potentially do this easier.

 

I currently have a table which includes a lot of information, but the main column that I'm using is the 'Highest Degree' column in a table called 'EMD Highest'. I have created another table which has the list of all degrees which are found in the Highest Degree column, along with the NQF Level of each degree, in a table called 'Degree + NQF' (which can be found below).

 

I would like to create a column in the EMD Highest table which pulls in the NQF Level from the 'Degree + NQF' table for the specific degree that an individual in my dataset has. For example, if an individual has a Bachelor of Arts, the created NQF column would show a 7. For a Diploma, it would show a 6, etc.

 

Please advise whether LOOKUPVALUE is the correct DAX formula to be using for this, or is there a more efficient way to do this?

 

Highest Degree Column

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi marc_slater ,

    Try using fuzzy matching in PowerQuery Editor.

    Appropriate adjustment of the parameters of the similarity threshold.

    DAX does not do as good a job as the M function in fuzzy matching.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

3 Replies

  • Based on your table descriptions, it should work. The key for LOOKUPVALUE() to work is that only one unique value for the result. In your case, if a degree has only one unique value (no blanks, no other values) in NQF Level, then LOOKUPVALUE() should work.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi marc_slater ,

    Try using fuzzy matching in PowerQuery Editor.

    Appropriate adjustment of the parameters of the similarity threshold.

    DAX does not do as good a job as the M function in fuzzy matching.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

    • marc_slater's avatar
      marc_slater
      New Member
      Thanks, I will try this out and get back to you