Forum Discussion
Relative Date Filter automatically changes from months to days
- 7 years ago
Hi Anonymous
Here is a workaround.
Create measures, then add [flag] in the visual level filter
In my example, today=2019/1/25
today = TODAY() today-year = YEAR([today]) today-month = MONTH([today]) flag = IF ( MAX ( 'Table'[year] ) = [today-year] && MAX ( 'Table'[month] ) = [today-month] && MAX ( 'Table'[Date] ) < [today], 1, 0 )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I see this problems only occurs for me in one report working on a different power BI dataset.
Both reports opened on the same computer using the same Power BI version. Any idea what might cause the relative date filtering to give problems? All relative date filters I set (no matter what I select: years, months, etc.) change to "last 30 days".
- Anonymous7 years agoNot applicable
It is actually almost similar to yours so I accept it as the solution. I basically created the same thing as you but then as a column, rather than a measure:
CurrentMonthFilter = if(and(and(month('date'[date])=month(today());year('date'[date])=year(today()));'date'[date]<TODAY());1;0)Thanks a lot for your help.