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
pfprado
Frequent Visitor

How to get minimum value from range date in DAX

I need to get a calculated measure of the minimum date of a range of values, ie I have a fact table with a date and two measures. When I filter by range date, I need to get the second measure of the minimum date of that range, in the example, the measure 1 of 1st january, something like this:

 

https://db.tt/6jKBPRCr

 

The picture on the left is as I have the data in the fact table, data from the right as they should be when I filter from date (from 1st to 6 january). The measure 1 is added for a group, and measure 2 is the minimum value of the range of dates and must be repeated for each resulting record (highlighted).

 

I would greatly appreciate your help with this.

Thank you for your time

2 ACCEPTED SOLUTIONS

AND AT LAST CREATE A FINAL MEASURE

 

FINALMeasure = CALCULATE([mymeasure],ALL('fact'[Group]))

 

This will defintely solve your problem.sol.PNG

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

Thanks a lot! you really help me

View solution in original post

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

FIRST CREATE A MEASURE

 

Sumofmeasure2 = SUM('fact'[Measure 2])

 

AND ON TOP OF THAT CREATE ANOTHER MEASURE

 

mymeasure = CALCULATE([Sumofmeasure2],FILTER('fact','fact'[Date]=MIN('fact'[Date])))

 

IT WOULD SOLVE YOUR PROBLEM IF I TOOK YOUR REQUIREMENTS CORRECTLY.

 

LET ME KNOW HOW IT GOES.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

AND AT LAST CREATE A FINAL MEASURE

 

FINALMeasure = CALCULATE([mymeasure],ALL('fact'[Group]))

 

This will defintely solve your problem.sol.PNG

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks a lot! you really help me

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.

Top Solution Authors
Top Kudoed Authors