cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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 IV
Super User IV

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors