Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi all,
I'm trying to get the previous months data from the table I have to put alongside the current months but the calculations I'm doing are not returning the results I expect.
If I use
available_count_LM = calculate(sum(FINAL[available]), PREVIOUSMONTH(DATES[report_period_end].[Date]))
Then no data is returned in the last month column.
If I use
available_count_LM = calculate(sum(FINAL[available]), PARALLELPERIOD(DATES[report_period_end].[Date], -1, MONTH))
Then the same values for the current month are returned for last month.
Dummy data:
FINAL table:
report_period_end,place,available,ReportingPeriod
31/10/2016,1,16382086,1617 M7
30/11/2016,1,16090055,1617 M8
31/12/2016,1,15746408,1617 M9
31/10/2016,2,15966152,1617 M7
30/11/2016,2,16249744,1617 M8
31/12/2016,2,16127134,1617 M9
31/10/2016,3,16143120,1617 M7
30/11/2016,3,15914663,1617 M8
31/12/2016,3,15941826,1617 M9
DATES Table:
ReportingPeriod,report_period_start,report_period_end
1617 M7,01/10/2016,31/10/2016
1617 M8,01/11/2016,30/11/2016
1617 M9,01/12/2016,31/12/2016
Thanks
Solved! Go to Solution.
Can you ensure the following is true?
When using date tables to invoke time intelligence in DAX there are three fundamental principles that must always be applied.
Can you ensure the following is true?
When using date tables to invoke time intelligence in DAX there are three fundamental principles that must always be applied.
Hi Jason,
Thanks for your response. The second two are true. The first isn't. I was using the distinct dates from my table as the only ones I use are the ones at the end of the month and so only 12 dates in a year rather than having to create a full date table to cover all years etc.
Thanks for answering and I'll guess I'll just create one.
Much appreciated.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
100 | |
65 | |
44 | |
36 | |
36 |