Forum Discussion

jaafer's avatar
jaafer
Frequent Visitor
8 years ago
Solved

Retrieve latest date

Hi  

I am new to power bi.  I have two tables  like  table 1  "item master" and table 2 "item ledger" i want to create a new column for "last sale date"  Please help me to create a lookup column in item table.  Picture attached

 

 

 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi jaafer,

     

    You can simply  use summarize function to create a table to store summarized 'item no' and max 'post date'.

    Table =
    SUMMARIZE (
        FILTER ( 'Sample', [entry type] = "sale" ),
        [item no],
        "MaxDate", MAX ( 'Sample'[posting date] )
    )
    

    Regards,

    Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    8 years ago

    HI jaafer,

     

    Nope, it not in query editor, it is dax formula.

     

    You can navigate to modify tab and choose new table, then input these to formula panel.

     

    Regards,

    Xiaoxin Sheng

6 Replies

  • jaafer's avatar
    jaafer
    Frequent Visitor

    i want to retrieve the latest date from "posting date" field and from "entry type" field equals to "sale".  Thanks.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi jaafer,

       

      You can simply  use summarize function to create a table to store summarized 'item no' and max 'post date'.

      Table =
      SUMMARIZE (
          FILTER ( 'Sample', [entry type] = "sale" ),
          [item no],
          "MaxDate", MAX ( 'Sample'[posting date] )
      )
      

      Regards,

      Xiaoxin Sheng

      • jaafer's avatar
        jaafer
        Frequent Visitor

        Thank you very much for reply. Can you please tell me where i will apply this code. Is it in query editor. Please I am very new to Power Bi