Forum Discussion
Tinus1905
Resolver I
2 years agoFirst 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
Super User
2 years agoHi 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
Resolver I
2 years agograzitti_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: