Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Referencing max date from another table in power query

I'm trying to add a custom column in power query and want to reference the maximum date from another table directly in Power Query. I've seen possible solutions to this, but not exactly like I'm look...
  • Ritaf1983's avatar
    2 years ago

    Hi Anonymous 
    You can solve it easily with the ux options of PQ.
    1. First step is to merge the tables :

    2. Second when expanding just choose the wanted aggregation:

    3. fix data type of result to date:

    Pbix is attached you can follow my steps

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Anonymous 
    This is how it works with power query, you need to merge tables.
    You can write M code / use ux but the logic is the same.

    Refer to other tables without merging possible with DAX calculated columns. 
    In your scenario it is by combining 
    Maxx + relatedtable.

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

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi Anonymous 
    I saw the solution, did you want to bring maximum date without referencing to the category?
    Because it is not the same result as a merging ...
    It brings the latest date by table level.