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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Different data depending on current month

Hi there,

 

I have a table of data and I want to only show records when the created on date is this current year if the current month is April onwards, but if the current month is before April, then I need the current year's records and all of last year's records.

 

Has anyone got any good ideas / can point me in the right direction please?

 

Many thanks,

Andy

1 ACCEPTED SOLUTION
Anonymous
Not applicable

No worries sorted it - possibly not the most efficient but it works - I created a new measure as below!

 

Include Record = if(and(year(max('Cases Table'[Created On Date]))>=year(today())-1,MONTH(today())<4),"Yes",if(and(year(max('Cases Table'[Created On Date]))=year(today()),MONTH(today())>3),"Yes","No"))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

No worries sorted it - possibly not the most efficient but it works - I created a new measure as below!

 

Include Record = if(and(year(max('Cases Table'[Created On Date]))>=year(today())-1,MONTH(today())<4),"Yes",if(and(year(max('Cases Table'[Created On Date]))=year(today()),MONTH(today())>3),"Yes","No"))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.