Forum Discussion
Syndicate_Admin
Administrator
2 years agoHelp to perform date filtering from 20 to 21
Hello hello, I wanted to ask for a little guidance to be able to make a filter that can give me the corresponding year but mainly that the month starts from the 20th of the previous month to the 21st...
- 2 years ago
This one worked for me;
Reporting Month = if(Dates[Day of Month] < 21, Dates[Month & Year], FORMAT(DATEADD(Dates[Date], 1, MONTH), "MMM YYYY"))
ray_aramburo
Super User
2 years agoYou wouldn't be able to use them as filters but you could create a pretty customized measure with time-intelligence and parameters. Something like:
DynamicMeasure = CALCULATE([WhateverExpressionYouWantToShow], DATESINPERIOD('DateTable'[Date], TODAY(),[ParameterField], MONTH))Syndicate_Admin
Administrator
2 years agoIf it really works for me, I ended up doing the following:
I made a start date
FiscalMonthStart =
IF(
(('DateTable'[Day]) >= 21), EOMONTH([Date],-1),EOMONTH([Date],-2)) +21
and another term
FiscalMonthEnd =
IF(
DAY('DateTable'[Date]) >= 21,
EOMONTH('DateTable'[Date], 0) + 20,
EOMONTH('DateTable'[Date], -1) + 20
)
Uniting it in
FiscalMonthName =
FORMAT('DateTable'[FiscalMonthEnd], "MMMM YYYY")
And then separating the information and then using what he mentioned to me
And it was finally like this
Thank you very much for your help