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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
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.