Forum Discussion
Giving Index Number
- 5 years ago
The solution I posted was for measures, not new calculated columns in the data table.
If you want to add these columns to the actual data table, you need:
1) New column concatenating date and order number
Concatenate date and order number = INT(INT('Table'[Delivery Date ]) & 'Table'[Order Number])2) New column for the index:
Index = RANKX ( FILTER ( ALL ( 'Table' ), 'Table'[Material] = EARLIER ( 'Table'[Material] ) ), 'Table'[Concatenate date and order number], , ASC )and you get this:
- 5 years ago
Good point! You can solve it for example by "inflating" the date expression: INT(table[Date]) * 100000000000000 + table[order number]
Here is one way.
1) Create a measure concatenating date (converted into an integer) and order number, making the result an integer:
sort by =
INT ( INT ( MAX ( 'Table'[Delivery Date ] ) ) & [Sum order number] )
2) create the index using RANKX on this [sort by] measure:
Index column by Material =
RANKX (
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Material] ),
NOT ( ISBLANK ( [sort by] ) )
),
[sort by],
,
ASC
)
and you get this result
- erhan_795 years agoPost Prodigy
Dear PaulDBrown ;
thank you very much ,
sort measure gave error so i coreccted as below , am i right ?
sort by =INT ( INT ( MAX ( 'Table'[Delivery Date ] ) ) & SUM('Table'[Order Number] ))and after that i tried a create a new columnn but i gor below error ,could you pls checki thik i try to create column but your example is measure , is there any way to create colum for ındex?- PaulDBrown5 years agoCommunity Champion
The solution I posted was for measures, not new calculated columns in the data table.
If you want to add these columns to the actual data table, you need:
1) New column concatenating date and order number
Concatenate date and order number = INT(INT('Table'[Delivery Date ]) & 'Table'[Order Number])2) New column for the index:
Index = RANKX ( FILTER ( ALL ( 'Table' ), 'Table'[Material] = EARLIER ( 'Table'[Material] ) ), 'Table'[Concatenate date and order number], , ASC )and you get this:
- erhan_795 years agoPost Prodigy
Thank you very much PaulDBrown , this is what i needed .