Forum Discussion
MrMarshall
Helper II
8 years agoNew 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
Resident Rockstar
8 years agoHi 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
MrMarshall
Helper II
8 years agoThank you! Worked perfectly :)
- v-piga-msft8 years ago
Resident 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