Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Display max value individual by day

Dear friends   please suggested me how i create max break in 1 day column that saying max break value individual by day, details as table below   Date           Name         Break time      ...
  • nandu_krishna's avatar
    6 years ago

    Anonymous 

     

    Try below DAX in a calculated column

     

    MaxBreak =
    VAR __maxTime =
        MAXX (
            FILTER (
                'Table',
                'Table'[Date] = EARLIER ( 'Table'[Date] )
                    && 'Table'[Name] = EARLIER ( 'Table'[Name] )
            ),
            'Table'[Break time]
        )
    VAR __result =
        IF ( 'Table'[Break time] = __maxTime, __maxTime, BLANK () )
    RETURN
        __result

     

    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos 🙂

  • amitchandak's avatar
    6 years ago

    Anonymous , Try like

    if([break time] =maxx(filter(table, [name]=earlier([name]) && [date]=earlier([date])),[break time]) ,[break time],blank())

  • Fowmy's avatar
    6 years ago

    Anonymous 

    Try this as measure:

    Measure = 
    VAR BT =  
    CALCULATE(
        MAX('Table'[Break time           ]),
        ALLEXCEPT('Table', 'Table'[Name        ],'Table'[Date          ]))
    
    RETURN
    
    IF( BT = MAX('Table'[Break time           ]),FORMAT(BT,"hh:mm"),"")

     

    ________________________

    Did I answer your question? Mark this post as a solution, this will help others!.

    Click on the Thumbs-Up icon on the right if you like this reply 🙂

    YouTube, LinkedIn