Forum Discussion
JimJim
Responsive Resident
2 years agoIssue with DATESINPERIOD
Hi Guys, Firstly, I am sorry for the lack of test data or even a pbix file, I tried replicating the issue in a test report so that I could demonstrate it to you, but I can't replicate the issue. ...
- 2 years ago
replace this piece of code with the following
VAR __dates = DATESINPERIOD('Time (previous months)'[CalendarDate], __selectedDate, -13, MONTH)to
VAR __dates = DATESBETWEEN('Time (previous months)'[CalendarDate] ,EDATE(__selectedDate,-13),__selectedDate)
Ahmedx
Super User
2 years agoreplace this piece of code with the following
VAR __dates =
DATESINPERIOD('Time (previous months)'[CalendarDate],
__selectedDate,
-13,
MONTH)
to
VAR __dates =
DATESBETWEEN('Time (previous months)'[CalendarDate]
,EDATE(__selectedDate,-13),__selectedDate)- JimJim2 years ago
Responsive Resident
Ahmedx , thank you. this works. But how? Is it a bug or am I being stupid?
- Ahmedx2 years ago
Super User
refer to the following
https://www.youtube.com/watch?v=ED1g4-RvLOs&ab_channel=taik18-MohammedAdnan