Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Help 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 of the month consulted, giving as an example that if today 21-05-2024 I require the information of January it gives me the data from 21-12-2023 to 20-01-2024, Thank you very much in advance

5 REPLIES 5
newellaa
Frequent Visitor

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
Super User

To not overcomplicate yourself, I would recommend just use the date field in a slicer, set it up as a Between type and input your dates:

ray_aramburo_1-1716302185098.png

ray_aramburo_2-1716302206044.png

 

 

ray_aramburo_0-1716302156975.png

 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





I mean, I currently have it like this, the question is if there was something more friendly, like just selecting the month and having it perform the automatic conditioning

You 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))




Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





If 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
fabrizzio_0-1716310774756.png

Thank you very much for your help

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.