Forum Discussion
Pete230
2 years agoHelper III
Create a costum column which counts consecutive negative numbers
Hi together; I would like to create a costum column C in power querry which counts the consecutive negative numbers in Column B. Which forml needs to be put in here: to achive the foll...
Anonymous
2 years agoNot applicable
Hi Pete230
First, add an index column in power query.
Then use the following code to add a custom column:
let
CurrentRow = [Index],
ListNegative = List.LastN(
List.FirstN(Source[B], CurrentRow+1),
each Number.FromText(_) < 0
)
in
List.Count(ListNegative)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Pete230
2 years agoHelper III
Hi Anonymous ; do you have any advice for that issue too?
That would be very much appreciated 🙂
Cheers, Pete