Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Need some DAX code to build a new Index column, as the screen shoot shown, I need use the column "NAME" and "Index' to build the new one.
Thanks in advance for your help
Solved! Go to Solution.
Please see attached file
Sorry,
Basically the logic is this, notice that the column name has two diferences descriptions, "UNIR HOMBROS" and "UNIR HOMBRO 1", and every sigle descrition has they own sub division, "AVERAGE", "GOAL" and "MAX", I need to build something like the sceenshot shown
Try this technique
First Add another Index Column from Query Editor
Then may be this calculated column will do the job
Column =
VAR Counts =
    CALCULATE (
        COUNT ( Table1[NAME] ),
        FILTER ( Table1, [NAME] = EARLIER ( [NAME] ) )
    )
RETURN
    IF (
        Counts = 1,
        RANKX (
            FILTER (
                Table1,
                CALCULATE (
                    COUNT ( Table1[NAME] ),
                    FILTER ( Table1, [NAME] = EARLIER ( [NAME] ) )
                )
                    = 1
            ),
            [NAME],
            ,
            DESC,
            DENSE
        ),
        RANKX ( FILTER ( Table1, [NAME] = EARLIER ( [NAME] ) ), [Index],, ASC, DENSE )
    )
					
				
			
			
				
Please see attached file
Thanks a lot for this input guys,
I did add the logic but, I getting this error, any comments about this issue?
Sorry guys,
Ignore my previous post, I did have a lapsus stupidus, 🙂
Hi
So Zubair_Muhammad's solution really helps you, right?
After testing, the solution turns out to be correct.
Could you kindly mark the answer as a solution?
Best Regards
Maggie
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |