Forum Discussion
Anonymous
6 years agoNot applicable
Create ascending index column by DAX based on row values
Dear friends
please guide me how can i create calculated index column that show ascending number based on value column like attached in data interfaces.
| Name | Value | Index |
| a | 10 | 2 |
| b | 10 | 1 |
| a | 5 | 1 |
| b | 15 | 2 |
| b | 20 | 3 |
| c | 10 | 2 |
| c | 5 | 1 |
| a | 15 | 3 |
Anonymous , Create a new column like
countx(filter(Table, [Name] = earlier([Name]) && [Value] <= earlier([Value])),[Value])
Anonymous ,
Try this column:
index =RANKX (FILTER (Sheet4,EARLIER ( Sheet4[Name] ) = Sheet4[Name]), Sheet4[Value],,ASC)Anonymous ,
Please see a below Screen shot with output:
5 Replies
- amitchandak
Super User
Anonymous , Create a new column like
countx(filter(Table, [Name] = earlier([Name]) && [Value] <= earlier([Value])),[Value])
- AnonymousNot applicable
Thanks you amitchandak and Tahreem24 for quick reply boths are worked correctly!!!
- Tahreem24
Super User
Anonymous ,
Try this column:
index =RANKX (FILTER (Sheet4,EARLIER ( Sheet4[Name] ) = Sheet4[Name]), Sheet4[Value],,ASC) - Tahreem24
Super User
Anonymous ,
Please see a below Screen shot with output:
- Mariusz
Community Champion
Hi Anonymous
Try this
Column = VAR __name = 'Table'[Name] VAR __tbl = FILTER( 'Table', 'Table'[Name] = __name ) RETURN RANKX( __tbl, 'Table'[Value],, ASC )Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn