Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Count changes per order and order line

Hi 

 

I have data like this 

 

Order Linechange type
abc1x
abc1t
abc2x
abc2t
bcd1x
bcd2x
bcd2x
bcd3x

 

 

and I would like to acheive dax table like this 

OrderLine# of changes
abc12
abc22
bcd11
bcd22
bcd31

 

 

or new column like this

Order Linechange type# of changes 
abc1x2
abc1t2
abc2x2
abc2t2
bcd1x1
bcd2x2
bcd2x2
bcd3x1

 

 

Thank you very much for support 

 

m

 

  • Anonymous , You can have a new measure like

     

    Distinctcount(Table[change_type])

     

    or a new column

    countx(filter(Table, [Order] =earlier([Order]) ),[Line])

1 Reply

  • Anonymous , You can have a new measure like

     

    Distinctcount(Table[change_type])

     

    or a new column

    countx(filter(Table, [Order] =earlier([Order]) ),[Line])