Forum Discussion
Need help with Looping to get latest status
- 3 years ago
vmat Nope you are making some mistake here you only need to use the Result part of the code. I tried by adding new column (Status4, Status5..) and it is working for me 🤘
Thanks AntrikshSharma for the quick reply.
I see you are using the 4 status (columns mentioned) in the table. But my problem is that the status keep increasing as the Order status changes, so I can have status5,status6, status7 and so on....
So, the first part of the problem is to find all the columns beginning with status and then for each row find the latest status.
THanks,
- AntrikshSharma3 years agoCommunity Champion
vmat That step is auto generated because I used the Enter Data option in Power BI, did you try the code with your data?
- vmat3 years agoFrequent Visitor
Yes,I did. I now inserted one more column "Status4" in my Order Table, but your query considered only first 4 status (till status3). So, the query ignore the status from Last column (Status4)
- AntrikshSharma3 years agoCommunity Champion
vmat Nope you are making some mistake here you only need to use the Result part of the code. I tried by adding new column (Status4, Status5..) and it is working for me 🤘