Forum Discussion

Vladas's avatar
Vladas
Frequent Visitor
7 years ago
Solved

Summarizing data from two different table

Hi,
 
I have two tabels:
 
'Items' with [ItemId] and 'Sale' with [ItemId] [SalesQty] and [SalesDate].  Relationship is created via [ItemId]
 
 I would like to create one summarized tabel with columns:   [ItemId] , SUM(SalesQty), LastDate(SalesDate).
 
How I can do that? 
 
Thanks
  • Hi Vladas,

     

    New a calculated table with below formula:

    Table =
    SUMMARIZE (
        Items,
        Items[ItemID],
        "Total SalesQty", SUM ( Sale[SalesQty] ),
        "LatestDate", LASTDATE ( Sale[SalesDate] )
    )

    Best regards,

    Yuliana Gu

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Vladas,

     

    New a calculated table with below formula:

    Table =
    SUMMARIZE (
        Items,
        Items[ItemID],
        "Total SalesQty", SUM ( Sale[SalesQty] ),
        "LatestDate", LASTDATE ( Sale[SalesDate] )
    )

    Best regards,

    Yuliana Gu

    • Vladas's avatar
      Vladas
      Frequent Visitor

      Thanks for help! I had a problem with relationships.