March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 revenue of Aug 2022 to Aug 2021, for instance.
I have the following DAX expression for this:
Solved! Go to Solution.
@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
@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
Hey, thanks for the help. The measure seems to be working reporting the right data, (essentially all sales - all of the most recent year). However, the measure reverts to (BLANK) once I try to select a daterange using a slicer.
Perhaps I should've made my goal a bit clearer. I currently have the table below to show changes in revenue each month and year, but I want to change this to revenue growth in comparison to last year.
Is there a way to get this done using this measure? Right now, using the measure shows this:
Nevermind, I didn't have any type of link established between 2 date columns in separate tables. The measure works perfectly now!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
19 | |
19 | |
16 | |
8 | |
5 |
User | Count |
---|---|
36 | |
28 | |
16 | |
16 | |
12 |