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 August 31st. Request your voucher.

Reply
AlexAlberga727
Resolver II
Resolver II

Retrieving LASTDATE when another column = 0

Folks - 

 

Im looking for a solution to something I would imagine to be very simple. Please help!

 

In the below screenshot you will see a visual which illustrates when specific product's inventory levels go to 0. Once 0, another column starts to calculate "Days not Allocated". I would like to retrieve the LASTDATE that SKU had a Days Not Allocated of 0.

 

For the selected SKU that date would be 5/27/2020.

 

Allocation Example.png

 

If anymore information is need please let me know.

Thanks!

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@AlexAlberga727 - Perhaps:

 

Measure = MAXX(FILTER('Table',[Avail Qty] > 0),[Date])

 

If a column. If a measure, create a table variable that represents the data in your visual (summarized by date for instance, use ADDCOLUMNS to add your measure, do your MAXX over that table variable. 



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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

There doesn't seem to be enough information in your post in order to give you a good answer.
saraMissBI
Resolver I
Resolver I

Hi  @AlexAlberga727 

 

Try the following:

measure = CALCULATE(LASTDATE(Table[Date]), [DaysNotAllocated] = 0)

 

If my answer resolves your issue, please give Kudos and mark as solution.

 

Thank you

Greg_Deckler
Community Champion
Community Champion

@AlexAlberga727 - Perhaps:

 

Measure = MAXX(FILTER('Table',[Avail Qty] > 0),[Date])

 

If a column. If a measure, create a table variable that represents the data in your visual (summarized by date for instance, use ADDCOLUMNS to add your measure, do your MAXX over that table variable. 



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 

 

Thanks for chiming in and providing me a solution.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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