Forum Discussion
Index based on other column
Hi, I want to create index based on column Week and use this column for sort in Bar chart
Many thank
Anonymous , if you have date this needs to be created based on date
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
5 Replies
- ALLUREANSolution Sage
Hi, Anonymous
Do you use calendar date table or this is the data structure?
- AnonymousNot applicable
Data structure
- amitchandakSuper User
Anonymous , if you have date this needs to be created based on date
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
- VahidDMSuper User
Hi Anonymous
You can add a new column to your table to show the YYYY number + Week number like this:
202101
202102
.
.
.
202153
202201
202202then use that to create a RANK column.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/