Forum Discussion
Calculated Column that checks the previous row
- Anonymous2 years ago
Hi crln-blue ,
First create an index column and count the number of occurrences of each Order ID.
Index = RANKX(FILTER(ALL('Order'), 'Order'[Order ID] = EARLIER('Order'[Order ID])), 'Order'[Order Item ID],, ASC, Dense)Create a calculated column that sets the Qty value to blank if index is not equal to 1. If index = 1, Qty value is retained.
Calculated Col_Qty = IF('Order'[Index] = 1,'Order'[Qty],BLANK())Drag columns to the report page for display.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi crln-blue ,
First create an index column and count the number of occurrences of each Order ID.
Index = RANKX(FILTER(ALL('Order'), 'Order'[Order ID] = EARLIER('Order'[Order ID])), 'Order'[Order Item ID],, ASC, Dense)
Create a calculated column that sets the Qty value to blank if index is not equal to 1. If index = 1, Qty value is retained.
Calculated Col_Qty = IF('Order'[Index] = 1,'Order'[Qty],BLANK())
Drag columns to the report page for display.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!