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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.