Forum Discussion

AllanBerces's avatar
AllanBerces
Icon for Post Prodigy rankPost Prodigy
1 year ago
Solved

Lookup Value from other Table

Hi and good day to all,

Can anyone help me on how can i get the value from table 01 to table 02.

  • My Table 01 is from one of my source data and save on my PC
  • My Table 02 is the summarized table from one of my table.

They have common column AREA and WEEK No. Pls refer below.

DESIRED OUTPUT

Thank you

  • Hi AllanBerces  Try Lookup value:

    Weekly_Plan = 
    LOOKUPVALUE(
        Table01[Weekly_Plan],
        Table01[Area], Table02[Area],
        Table01[Week No], Table02[ID_WeekNo ]
    )

     

     

     

    Hope this helps!!

    If this solved your problem, please accept it as a solution and a kudos!!

     

    Best Regards,

    Shahariar Hafiz

3 Replies

  • Hi AllanBerces  Try Lookup value:

    Weekly_Plan = 
    LOOKUPVALUE(
        Table01[Weekly_Plan],
        Table01[Area], Table02[Area],
        Table01[Week No], Table02[ID_WeekNo ]
    )

     

     

     

    Hope this helps!!

    If this solved your problem, please accept it as a solution and a kudos!!

     

    Best Regards,

    Shahariar Hafiz

  • Wilson_'s avatar
    Wilson_
    Icon for Memorable Member rankMemorable Member

    Hi Allan,

     

    For a quick solution, try adding the below as a calculated column in Table 02:

    Weekly_Plan =
    MINX (
        CALCULATETABLE (
            'TABLE 01',
            'TABLE 01'[Area] = 'TABLE 02'[Area],
            'TABLE 01'[Week No.] = 'TABLE 02'[ID_WeekNo]
        ),
        'TABLE 01'[Weekly_Plan]
    )

     

    However, as a more robust solution, if this model will grow in the future, I would leave them as two separate tables and create a dimension table for your areas and a dimension table for your weeks/dates. If you are interested, this is a great introduction to data modeling. If you are not interested, the above should help you! 🙂


    ----------------------------------
    If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

     

    P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.