Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Latest Date - TIMESTAMP dax

Hello, 
I have an issue, because Owner delivered the files with the name product and version but 2 times the most recent date is correct. I need to select the product with the version for the latest date. 
Example: 

TIMESTAMPProductVersion
17.10.2022P1_v01.8801.88
09.08.2022P1_v01.8701.87

 

Could you help me?

  • Hi Anonymous ,

    According to your description, in my understanding, you want to filter out the product and version which has the latest date, if you want to do it in a visual, just create a measure.

    Check =
    IF (
        MAX ( 'Table'[TIMESTAMP] ) = MAXX ( ALL ( 'Table' ), 'Table'[TIMESTAMP] ),
        1,
        0
    )
    

    Put the measure in the visual filter and select its value to 1.

    After apply filter, get the result:

    If you want to mark it in the table, create a calculated column.

    Flag =
    IF ( 'Table'[TIMESTAMP] = MAXX ( ALL ( 'Table' ), 'Table'[TIMESTAMP] ), 1 )
    

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

3 Replies

  • Samarth_18's avatar
    Samarth_18
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous ,

     

    You can create a measure as below:-

    Measure_ =
    CALCULATE (
        MAX ( 'Table'[Product] ),
        FILTER ( ALL ( 'Table' ), 'Table'[TIMESTAMP] = MAX ( 'Table'[TIMESTAMP] ) )
    )
    
  • Hi Anonymous ,

    According to your description, in my understanding, you want to filter out the product and version which has the latest date, if you want to do it in a visual, just create a measure.

    Check =
    IF (
        MAX ( 'Table'[TIMESTAMP] ) = MAXX ( ALL ( 'Table' ), 'Table'[TIMESTAMP] ),
        1,
        0
    )
    

    Put the measure in the visual filter and select its value to 1.

    After apply filter, get the result:

    If you want to mark it in the table, create a calculated column.

    Flag =
    IF ( 'Table'[TIMESTAMP] = MAXX ( ALL ( 'Table' ), 'Table'[TIMESTAMP] ), 1 )
    

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello v-yanjiang-msft , 
      What should I do if I want to do its for all date? Should I use Power Query?