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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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