Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have a large table with quarterly amounts like this:
Desc 1 | Desc 2 | Desc 3 | Desc 4 | Desc 5 | Desc 6 | Year | Quarter | Date | Actual |
AAA | BBB | CCC | DDD | EEE | FFF | 2012 | Q1 | 3/31/2012 | xxx |
AAA | BBB | CCC | DDD | EEE | FFF | 2012 | Q2 | 6/30/2012 | xx |
I calculated the date column in Power Query, to show the last date for each quarter. This date has a relationship with a calendar table.
I tried to create a measure in DAX to calculate the last year (2011) amount for each quarter. I have complete data for each of the quarters in 2011 and with the same values from Desc 1 to Desc 6 (description). However, because I don't have daily data, the measure returns empty value.
How to create a measure in DAX to show last year - last quarter for each line?
Thanks
Hi @amitchandak
Thank you for your reply. I previously tried to use the time intelligence measures you mentioned but they are returning blank. I think the reason is that the data is available only for the end of each quarter, e.g. (3/31/2012), (6/30/20212), so it is not time continuous.
@Danny2020 , Join the date of your table with the date of a date table. It should be marked as a date table. You need to use the field from the date table in measure, visual and slicer.
You can try 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]))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
43 | |
40 |