Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV
Helper IV

Modify measure to return the most recent occurrence of two values

Hello all, the measure below has been working great until a few days ago when the users decided to start moving tasks back into a bucket where the task may have started. The measure assumes that the tasks will advance through the buckets. Now when the task gets moved back into a previous bucket, the measure is ignoring the newer date. you can see the issue in the sample data below. The Backlog on line 2 is the current Bucket and should have started it's duration on 3/16. Thanks for any help


Customer ABacklog1/12/20233/1/20231/12/2023
Customer ABacklog1/12/20233/1/20233/16/2023
Customer ANot Interested / No Response3/1/20233/16/20233/1/2023



Bucket Start Date = 
VAR _currentBucket = 
VAR _currentTask =
            FactTable[BucketID] = _currentBucket && FactTable[TaskID] = _currentTask



Super User
Super User

@rixmcx59 Maybe:

Bucket Start Date = 
  VAR _currentBucket = MIN(FactTable[BucketID])
  VAR _currentTask = MIN(FactTable[TaskID])
  VAR _table = 
      FactTable[BucketID] = _currentBucket && FactTable[TaskID] = _currentTask
  VAR _result = MAXX(__table, [Created])

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thanks so much for the reply. I tried your measure and it's ignoring the first Bucket Start date, although it is accurate in returning the current Backlog bucket start. One of my report pages is tracking Bucket Change/Bucket duration, in this case I would need to track "Backlog" duration, then "Not Interested/No Response" duration and then Backlog again. I need the measure to capture start and end date no matter what the Bucket ID/Name is. Thanks

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors