Forum Discussion
New Measure
Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example.
You can compare time in Column like
if([Laikas] >=time(4,30,0))
or measure like
if(max([Laikas]) >=time(4,30,0))
How to deal with duration -https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
Appreciate your Kudos.
Yes, that's part of the measure, so I want to say that if Laikas(Time) exceeds 04:30:00 then return the difference between overtime and 04:30:00
- amitchandak5 years agoSuper User
Anonymous , Evening 4 would be 16.
Row context will play role in answer
Try like
if(max([Laikas]) >=time(4,30,0) , max([Laikas]) - time(4,30,0) , 0 )
if(max([Laikas]) >=time(4,30,0) , max([Laikas]) - time(16,30,0) , 0 )
or
if(max([Laikas]) >=time(4,30,0) , datediff(max([Laikas]), time(4,30,0),minute) , 0 )
if(max([Laikas]) >=time(4,30,0) , datediff(max([Laikas]), time(16,30,0),minute) , 0 )and a sum like
sumx(Values(Table[Indeksas]), if(max([Laikas]) >=time(4,30,0) , datediff(max([Laikas]), time(16,30,0),minute) , 0 ))
or
sumx(Values(Table[Indeksas]), if(([Laikas]) >=time(4,30,0) , datediff(([Laikas]), time(16,30,0),minute) , 0 ))
- Anonymous5 years agoNot applicable
It still doesn't work, this is my following table. first column is time in the whole number format and then second one is norm that should not be exceeded, if it exceeds this norm, then return the difference(Third column) between the two, but if it does not exceed 04:30 then return 00:00:00.
- amitchandak5 years agoSuper User
Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.