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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors