Forum Discussion

BI-Leo's avatar
BI-Leo
Frequent Visitor
4 years ago
Solved

Vlookup

Hi Everyone, I tried to transfer fomula Vlookup in Excel to PowerBI Desktop, but I am unable to do so. My aim is to extract column B in 'Group' sheet, here's my formula in Excel '=VLOOKUP(A:A,Group!A:B,2,TRUE)'

               

I know LOOKUPVALUE there in PowerBI, but it cannot deal with such scenario, so currently I am writing below DAX in PowerBI, but it isn't flexible enough, is there any other approches to solve such scenario? 

Hopefully someone could help, Thank you!

 

 

3 Replies

  • BI-Leo's avatar
    BI-Leo
    Frequent Visitor
    'Data'[No. of Lives] in DAX can treat as column A in Data sheet
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BI-Leo,

    It sounds like a segmentation related requirement, you can take a look at the following blog to know how to use DAX expression to achieve these:

    Static segmentation – DAX Patterns

    Regards,

    Xiaoxin Sheng

    • BI-Leo's avatar
      BI-Leo
      Frequent Visitor

      Thanks a lot bro, what a brilliant idea! I created a  column in Group to find its next row, and then match Group and Data, it works!