Forum Discussion
Anonymous
4 years agoNot applicable
Help with advance IF function
Hi Friends, I was trying to insert "Last Result" using some Ifs Dax Function, but the result is always "Not Done" or Errors. I just want to have in "Last Result" the last data in previous column...
- 4 years ago
Use below in a custom column in PQ
= [l=List.FirstN(List.RemoveItems(List.Reverse(List.RemoveFirstN(Record.ToList(_),1)),{"Not Done"}),1), r=if List.IsEmpty(l) then "Not Done" else Text.Combine(l)][r]
Greg_Deckler
Community Champion
4 years agoAnonymous Is that how your raw data looks? If so, I highly recommend that you unpivot your month columns in Power Query and add an index or something so that you can determine which rows are earlier or later.
Anonymous
4 years agoNot applicable
Hi Greg_Deckler ,
Thanks for your reply!
Yes, my raw data are that.
For my purpose is no matter if columns are dates or something else.
The importance is "Last Result" give me the last column (in orange table, because they are ordered correctly) that is "Good" or "Bad" and if there is no column with that 2 result so give me "Not Done".
Now I don't know if your suggest fit with my reply.
Thank you!