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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
PbiCeo
Helper II
Helper II

How to get Date value under a specific price condition

Hello everyone,

 

I want to get Date if the min price for a certain period of time (for example a month) goes lower than max price for the same time frame with a specific condition.

Date  Price
2020/8/1  25,734
2020/8/2

  20,812

2020/8/3  20,095
2020/8/4  20,015

 

I've created Mesuare like below, but the Date is displayed only as summary on Table Visual.

 

Measure =
VAR _min = MINX('table', [Price])
VAR _max = MAXX('table', [Price])

Return
minx(FILTER('table', _min < _max * 0.5), [Date])

What is incorrect in the syntax or any advice please?
Thanks in advance,
Vladi


1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PbiCeo ,

Measure =
VAR _min = MINX('table', [Price])
VAR _max = MAXX(allselected('table'), [Price])

Return
calculate(minx(values('table'[Date]),[Date]),filter('table',_min <_max))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Sujit_Thakur
Solution Sage
Solution Sage

Dear @PbiCeo  ,
Can you please give some example my some dummy data ??
make it in excel of 5-6 rows and paste it here in your post and tell what output is desired in another pasted excel rows

amitchandak
Super User
Super User

@PbiCeo ,

Measure =
VAR _min = MINX('table', [Price])
VAR _max = MAXX(allselected('table'), [Price])

Return
calculate(minx(values('table'[Date]),[Date]),filter('table',_min <_max))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@PbiCeo - Seems like you want Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



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...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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