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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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