Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Naveennegi119
Helper III
Helper III

Count data

Hi All,

 

I want to count in sequence but using many dax or create new column i get duplicate sequence no. in duplicate data see Below:-

 

duplicate Count.JPG

 

 I want count see below:-

sequence count.JPG

Regards,

NICK

3 ACCEPTED SOLUTIONS

Hi @Naveennegi119

 

First add an Index Column in your Table from the Query Editor >>"Add Column" tab

 

Then you can use this formula

 

Expected Situation 1 =
RANKX (
    FILTER ( Table1, Table1[Sub] = EARLIER ( Table1[Sub] ) ),
    Table1[Value]
        - Table1[Index] / 1000,
    ,
    DESC,
    DENSE
)

Regards
Zubair

Please try my custom visuals

View solution in original post

@Naveennegi119

 

And this for expected situation 2

 

Expected Situation 2 =
RANKX ( Table1, Table1[Value] - Table1[Index] / 1000,, DESC, DENSE )

Regards
Zubair

Please try my custom visuals

View solution in original post

@Naveennegi119

 

Please see attached sample file as well

 

Coountdata.png


Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
Naveennegi119
Helper III
Helper III

Hi All,

 

I think right now there is no solution of this situation.

That's why no body answering.

Smiley SadSmiley SadSmiley Sad

 

 

regards,

NICK

Hi @Naveennegi119

 

First add an Index Column in your Table from the Query Editor >>"Add Column" tab

 

Then you can use this formula

 

Expected Situation 1 =
RANKX (
    FILTER ( Table1, Table1[Sub] = EARLIER ( Table1[Sub] ) ),
    Table1[Value]
        - Table1[Index] / 1000,
    ,
    DESC,
    DENSE
)

Regards
Zubair

Please try my custom visuals

@Naveennegi119

 

And this for expected situation 2

 

Expected Situation 2 =
RANKX ( Table1, Table1[Value] - Table1[Index] / 1000,, DESC, DENSE )

Regards
Zubair

Please try my custom visuals

@Naveennegi119

 

Please see attached sample file as well

 

Coountdata.png


Regards
Zubair

Please try my custom visuals

Hi @Zubair_Muhammad,

 

Thanks for sharing idea,

 

it's working fine for me,

 

 

Regards,

NICK

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.