Forum Discussion

cottrera's avatar
cottrera
Post Prodigy
5 years ago
Solved

DAX - Max time

Hi   I have a table containing the following columns. Date, Name and Time. See example table below. You will see that some names have multiple times on the same date. I need to create a new column...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, cottrera 

    Please check the below.

    It is for creating a new column.

     

     

    Max Time CC =
    VAR currentdate = 'Table'[Date]
    VAR currentanme = 'Table'[Name]
    RETURN
    IF (
    CALCULATE (
    MAX ( 'Table'[Time] ),
    FILTER ( 'Table', 'Table'[Date] = currentdate && 'Table'[Name] = currentanme )
    ) = 'Table'[Time],
    'Table'[Time],
    BLANK ()
    )
     

    Hi, My name is Jihwan Kim.


    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM