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
Anonymous
Not applicable

Check date if its within StartDate and EndDate

Hi All,

 

I have orders with StartDate and EndDate. and i have a filter "Month Year". 

When i select a value in MonthYear Filter, for example "August 2020",  i need to check if Aug 2020 is between the startdate and the enddate and provide orders only meet this criteria. 

 

Any help in getting this please.

 

LP280388_0-1600870688886.png

 

6 REPLIES 6
VijayP
Super User
Super User

@Anonymous 

Calculate(Measure,filter(all(datestable),datesbetween(datestable[dates], min(selectedvaluue(dates[date),max(selectedvalue(dates[date])

Please try this Formula Measure and let me know




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  Hi Vijay,

 

Could you please elaborate more on your solution.

 

I have "month year" in a seperate table and the startdate and enddate is in one table. 

 

I need to compare if the value selected in "monthyear" is between this startdate and enddate.

Anonymous
Not applicable

Hi all,

 

I think my question is very simple, but somehow im unable to figure it out and not able to find relevant answers in powerbi forum.

 

Please please help me with this.

@Anonymous Re-reading post, you need a Complex Selector. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

 

The trick is to use ALL in order to break filter context and then determine if each item is within range. It is nex to impossible to be more specific without sample data as text and expected output.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Anonymous Are you looking for something like LookupValue Range?

https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/m-p/974201#M430



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  Thanks Greg.  

 

I need to check if the date i have selected in the filter is within the startdate and the enddate and put orderamount next to it if it matches the criteria.

 

I'm bit confused with the lookupvalue range solution that you have implemented. Would you mind explaining how i can modify to my scenario? 

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.