Forum Discussion

robertvdleeuw's avatar
robertvdleeuw
Frequent Visitor
4 years ago
Solved

Append table with column from calculateTable.

I have the following table. I want use it to calculate the difference between the revenue of a given date, and that same date but one year ago, as to eventually create a visual in which I compare the...
  • amitchandak's avatar
    4 years ago

    robertvdleeuw , with help from date table you can have measure like

     

    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

     

    diff = SUM(Sales[Sales Amount]) - [Year behind Sales]

     

    Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
    Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s