Forum Discussion
Bunta
9 years agoFrequent Visitor
Can't get previous months data
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 ...
- 9 years ago
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.
- The date range must be continuous in the Date table. That is there must not be any dates missing in the column that contains the list of calendar days in the table of dates.
- The date range in the Date table must encompass all the dates that you will be using in other tables in the data model.
- For time intelligence in Power BI Desktop to work correctly the fields used to join a date table and a data table must both be set to the date or datetime data type.
SqlJason
9 years agoMemorable Member
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.
- The date range must be continuous in the Date table. That is there must not be any dates missing in the column that contains the list of calendar days in the table of dates.
- The date range in the Date table must encompass all the dates that you will be using in other tables in the data model.
- For time intelligence in Power BI Desktop to work correctly the fields used to join a date table and a data table must both be set to the date or datetime data type.
- Bunta9 years agoFrequent Visitor
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.