Forum Discussion

KamphuisB's avatar
KamphuisB
Frequent Visitor
9 years ago
Solved

Count text values in column +1 DAX formula

Dear Power BI Users,   I am a bit new to the DAX formulas. I have searched a lot on the forum but i haven't found my answer for the following question.    I would like to create a calculated colu...
  • v-huizhn-msft's avatar
    9 years ago

    Hi KamphuisB,

    For your requirement, you’d better add a index column, and calculate the result based on the index column. I reproduce your scenario and get desired result as follows.

    Click the table, right click->Edit Query. In the Power Query Editor, under Add column, click add index column highlighted in yellow. You will get the index from first rows shown in following screenshot.



    Then create another calculated column using the formula below.

    ColumnB = RANKX(FILTER(Test1,Test1[ColumnA]=EARLIER(Test1[ColumnA])),Test1[Index],,ASC)




     

     

    If you have any other issue, please feel free to ask.

    Best Regards,
    Angelia