Forum Discussion
Display max value individual by day
- 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 __resultDid I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂 - 6 years ago
Anonymous , Try like
if([break time] =maxx(filter(table, [name]=earlier([name]) && [date]=earlier([date])),[break time]) ,[break time],blank())
- 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 🙂
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 🙂
- Anonymous6 years agoNot applicable
nandu_krishna nice solution, i have another question what if i need to show "Need a break" instead of show max break in Max break in 1 time column what should i do cause i just try to adjust your dax like below but its go wrong.
Event =VAR __maxTime =MAXX (FILTER ('Detailed Trip Report (Break)','Detailed Trip Report (Break)'[Date] = EARLIER ( 'Detailed Trip Report (Break)'[Date] )&& 'Detailed Trip Report (Break)'[AssetName] = EARLIER ( 'Detailed Trip Report (Break)'[AssetName] )),'Detailed Trip Report (Break)'[ref.Event])VAR __result =IF ( 'Detailed Trip Report (Break)'[ref.Event] = __maxTime,"Need more break", BLANK () )RETURN- nandu_krishna6 years agoMicrosoft Employee
Anonymous
In your DAX, I could see that you are not returning the __result variable.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂- Anonymous6 years agoNot applicable
nandu_krishna Thank you so much : )