Forum Discussion

powerbi_lost's avatar
powerbi_lost
Frequent Visitor
4 years ago
Solved

Lookup using DAX

This is the result I am looking for. It's a table visual created in the report view. I want to get the April vaules from the lookup table below and match it for each branch:

 

Lookuptable:

 

I need to lookup the brach from the visual table and get the data for just April in the visual. I need to create a DAX measure since it will help me with other calcualtions that I need to create later on. Any idea how to tackle this problem?

 

Sorry I am a new user to Power BI so I apologize if the explanation isn't that clear.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi powerbi_lost ,

     

    According to your screenshot, I know [Branch] and data in each month are in same table. I think you don't need to use dax to lookupvalue in April. You can add [Branch] and [April] columns in table visual and then you can get the result you want. Power BI will lookupvalue automaticlly by context. If you want to calculate [April] by measure, you can try sum function to get summarize value.

    April Measure = SUM('Table'[April])

     

    Best Regards,
    Rico Zhou

     

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

3 Replies

  • Hi powerbi_lost 

     

    Your request isn't very clear.  What's the lookup table?  What are you looking up?  How is your data connected?  What does your data look like?  What does your desired result look like?

     

    Please provide sample data (not pictues) and show what you want the final table to look like.

     

    Regards

     

    Phil

    • powerbi_lost's avatar
      powerbi_lost
      Frequent Visitor

      Hi Phil,

      I edited my post and I hope it's more clear now. If you want the data I can personally email you the file I'm wokring on. 

       

      Thanks. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi powerbi_lost ,

         

        According to your screenshot, I know [Branch] and data in each month are in same table. I think you don't need to use dax to lookupvalue in April. You can add [Branch] and [April] columns in table visual and then you can get the result you want. Power BI will lookupvalue automaticlly by context. If you want to calculate [April] by measure, you can try sum function to get summarize value.

        April Measure = SUM('Table'[April])

         

        Best Regards,
        Rico Zhou

         

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