Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

calculate 2 amount in different periode

hello , i have a probleme to calculate 2 amount in 2 different periode.
Infact , I would like to create a report (a table) which displays for each article in a first column the quantity of the current stock and the second column contains the amount of its sale of the previous year or the last 6 months. so to summarize, I would like to have 2 information each for a specific date in the same table. Is it possible ? If yes, how
thank you.

3 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    Based on my assumption, I created below sample table.

     

    Please new a calculated table.

    result table =
    SUMMARIZE (
        table3,
        table3[Article],
        "Current Y", CALCULATE (
            SUM ( table3[Sales] ),
            FILTER ( table3, table3[Date].[Year] = YEAR ( TODAY () ) )
        ),
        "Previous Y", CALCULATE (
            SUM ( table3[Sales] ),
            FILTER ( table3, table3[Date].[Year] = YEAR ( TODAY () ) - 1 )
        )
    )

     

    Best regards,

    Yuliana Gu

    • Anonymous's avatar
      Anonymous
      Not applicable

      heyy , thank you for your response , however it's not what i want ,infact , i want to fix a column on the current year and another column on a different year and different periode