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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Date Filter in measure

Hey Power BI Community!

I need in a measure a date filter like Date is after 01.10.2020 for calculation.

How can I achieve this? Here is my measure: 

DOA rate (monthly) =(DIVIDE('Parts per Month'[DoAs], [Count of Parts]))

I need the var result part for a propper visualisation. 

Thank you for your time
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Be aware that DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.

It is very difficult to analyze without looking at the data and just by imagining

Any chance you can share a PBIX file with dummy data or share sample data and the formula of [Count of Parts]?

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
giuliapiazza94
Helper IV
Helper IV

I've understood your problem beacuse I've similiar one. 

I've solved using:

Sales  =
var date_max = MAX(Calendar[Date])
return
CALCULATE(sum[Sales], Calendar[Date] > date_max)
 
So, if i've a date filter     01/01/2022 < date < 31/01/2022  the measure returns the sales after 31/01/2022
VijayP
Super User
Super User

@Anonymous 

var result =(DIVIDE('Parts per Month'[DoAs], [Count of Parts]))+0
return if(result, result, IF(MAX(Dates[Date2])>DATE(2019,9,30),0, BLANK())) 
 
The Bold part not clear to me. is there any sample data to answer this question ! Share your Kudoes



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

@VijayP  Thank you for your respond.

I am sorry for the confusion. 

 

Lets take this measure= ((DIVIDE('Parts per Month'[DoAs], [Count of Parts]))

I want to calculate the value of the last Financial year (09.09.2019-30.09.2020) - the value of the new financial year (01.10.2020 - )

So I think I need to make two measures with different date filter. How can I calculated that.

Hi @Anonymous ,

 

Be aware that DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.

It is very difficult to analyze without looking at the data and just by imagining

Any chance you can share a PBIX file with dummy data or share sample data and the formula of [Count of Parts]?

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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