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
CA8172
Helper I
Helper I

Getting Max Date tied to specific ID

I have a list of Tracking ID's with respective Assessment ID's.  The tracking ID is the same but a different assessment ID for each tracking ID.  We use the same create date and tracking completion date, but each assessment can be completed on a different date (see below).

Tracking IDAssessment IDDate CreateTracking CompAssessment Comp
548794110019/1/20219/30/20219/5/2021
548794110029/1/20219/30/20219/28/2021
548794110039/1/20219/30/20219/17/2021
     
451265105549/15/202110/27/20219/17/2021
451265100559/15/202110/27/202110/1/2021
451265100569/15/202110/27/202110/20/2021
451265100579/15/202110/27/20219/30/2021
451265100589/15/202110/27/20219/30/2021
451265100599/15/202110/27/202110/7/2021
     
4512651178510/7/202112/1/202111/30/2021
4512651178610/7/202112/1/202110/28/2021
4512651178710/7/202112/1/202110/29/2021
4512651178810/7/202112/1/202111/7/2021

 

I need to figure out a way to determine what the Max Assessment Date is for each Tracking ID (see below).

Tracking IDAssessment IDDate CreateTracking CompAssessment Comp
548794110029/1/20219/30/20219/28/2021
451265100569/15/202110/27/202110/20/2021
4512651178510/7/202112/1/202111/30/2021

 

I have tried the MAX formula, but since we need to use it respectively back to a tracking ID, I only get the max date of (for example) yesterday.

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @CA8172 ,

 

Create a measure and put it into the visual level filter. Set show items when the value is 1.

Measure = var _max=MAXX(FILTER(ALLSELECTED('Table'),[Date Create]=MAX('Table'[Date Create])),[Assessment Comp])
return IF(_max=MAX('Table'[Assessment Comp]),1)

vstephenmsft_0-1642400301938.png

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @CA8172 ,

 

Create a measure and put it into the visual level filter. Set show items when the value is 1.

Measure = var _max=MAXX(FILTER(ALLSELECTED('Table'),[Date Create]=MAX('Table'[Date Create])),[Assessment Comp])
return IF(_max=MAX('Table'[Assessment Comp]),1)

vstephenmsft_0-1642400301938.png

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

freginier
Solution Specialist
Solution Specialist

Create calculated column to assign flag and filter it

Flag = 
var maxAsses = CALCULATE( MAX(Table2[Assessment ]),FILTER(Table2,EARLIER(Table2[TrackingID])=Table2[TrackingID]&&Table2[Create] = EARLIER(Table2[Create])))
return 
if ( maxAsses = Table2[Assessment ],"X" )

 

DataInsights
Super User
Super User

@CA8172,

 

Use this measure as a visual filter. In your sample data, did you mean to use three different Tracking ID?

 

Max Assessment Comp =
VAR vMaxDate =
    CALCULATE (
        MAX ( Table1[Assessment Comp] ),
        ALLEXCEPT ( Table1, Table1[Tracking ID] )
    )
VAR vResult =
    IF ( MAX ( Table1[Assessment Comp] ) = vMaxDate, 1 )
RETURN
    vResult

 

DataInsights_0-1641999265192.png

 

DataInsights_1-1641999287322.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.