Forum Discussion
Add Custom Column 'Batch'
- 4 years ago
Hi seenai ,
1. Add the Index column.
2. Add the following custom columns in Power Query Editor.
= if [Index]=1 then null else #"Added Index"{[Index]-2}[ModelNo]= if [ModelNo]=[PrevRow] and [Index]-#"Added Custom"{[Index]-2}[Index]=1 then 1 else 03. Create calculated columns:
Index2 = VAR MaxIndex = MAXX ( FILTER ( 'Table', 'Table'[Index] < EARLIER ( 'Table'[Index] ) && 'Table'[Custom] = 0 ), 'Table'[Index] ) RETURN IF ( 'Table'[Custom] = 0, 'Table'[Index], MaxIndex )Order = RANKX ( 'Table', 'Table'[Index2], , ASC, Dense )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
seenai add a rank column, follow these posts.
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡