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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
NiugeS
Helper V
Helper V

Measure - Filter with relative date

Hi all,


I'm a bit stuck (and still learning BI) but I have a column 'Items' that includes a description of 'Highest'.  I have been able to create a measure that gives me a total of 'Highest' as per below.

KeyCount for High Priority = CALCULATE(  [KeyCount], 'Items'[Priority] = "Highest")
 
I am now trying to add a measure on the same column but provide me with a total of 'Highest' but only where the 'Created' date is within the past 6 months.

I can do it using the visuals on the filter but stuck on the measure. 

Any guidance appreciated.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@NiugeS , Try a measure like

 


KeyCount for High Priority = CALCULATE( [KeyCount], filter('Items', 'Items'[Priority] = "Highest" && 'Items'[created Date] >= eomonth(today(),-7) + 1 && 'Items'[created Date] <=today()))

View solution in original post

2 REPLIES 2
NiugeS
Helper V
Helper V

@amitchandak Thank you!  That worked.  Can I ask why eomonth(today(),-7)+1 and not simply eomonth(today(),-6)?

amitchandak
Super User
Super User

@NiugeS , Try a measure like

 


KeyCount for High Priority = CALCULATE( [KeyCount], filter('Items', 'Items'[Priority] = "Highest" && 'Items'[created Date] >= eomonth(today(),-7) + 1 && 'Items'[created Date] <=today()))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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