Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Conditional Index Column Based on Date

Good day to you all   I am looking for some assistance in creating an index column called Trading Day No. based on the sorted date column. Index numbers should begin at 1 and all rows with the same...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    Hi Anonymous

     

    With DAX you can achieve the same with RANKX

     

    Add it as a calculated column

     

    Trading Day No. =
    RANKX ( TableName, TableName[Date],, ASC, DENSE )