Forum Discussion
Tinus1905
2 years agoResolver I
First value to find after column value
Hi, In PowerBi query editor I want to find the first value based on date and name. This is what I have: Date Employee Hours Sick 1-1-2024 Dave 8 1 2-1-2024 Dave 6 1 3-1...
grazitti_sapna
2 years agoSuper User
Hi Tinus1905 ,
You can try using:- =
if [Sick] = 1 and ([Employee] <> #"Shifted Row"[Employee] or #"Shifted Row"[Sick] = 0) then [Hours] else null
and for Sick hours:-
= if [First_sick] <> null then [First_sick] else null
and for working hours.
= if [First_sick] = null then [Hours] else null
This should give you the appropriate columns.
Thank you
Tinus1905
2 years agoResolver I
grazitti_sapna when I use if [Sick] = 1 and ([Employee] <> #"Shifted Row"[Employee] or #"Shifted Row"[Sick] = 0) then [Hours] else null in a custom column, I get the same results as column "Hours".
The result must be: