Forum Discussion
MrMarshall
8 years agoHelper II
New column based on multiple sorted rows
Trying to create a new column based on multiple sorted rows within the same OrderNumber. I have the following schema: Description OrderNumber OrderRow Art 1 30000 10 Art 2 30000 20 ...
- 8 years ago
Hi MrMarshall,
You could create a calculated column with dax expression below.
New Column = CALCULATE ( MAX ( 'Order'[Description] ), FILTER ( 'Order', 'Order'[OrderNumber] = EARLIER ( 'Order'[OrderNumber] ) && 'Order'[OrderRow] = MIN ( 'Order'[OrderRow] ) ) )Then you will get your expected output.
Hope this can help you!:smileytongue:
Best Regards,
Cherry
v-piga-msft
8 years agoResident Rockstar
Hi MrMarshall,
You could create a calculated column with dax expression below.
New Column =
CALCULATE (
MAX ( 'Order'[Description] ),
FILTER (
'Order',
'Order'[OrderNumber] = EARLIER ( 'Order'[OrderNumber] )
&& 'Order'[OrderRow] = MIN ( 'Order'[OrderRow] )
)
)
Then you will get your expected output.
Hope this can help you!:smileytongue:
Best Regards,
Cherry
- MrMarshall8 years agoHelper II
Thank you! Worked perfectly :)
- v-piga-msft8 years agoResident Rockstar
Hi MrMarshall,
It is glad that we can help. Only thing that you'll have to notice, just always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry