Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello, i am new to DAX
I've searched all over, but i can't find a solution to my problem.
My data is as follows:
Part number |
AB |
AB |
1234 |
M4 |
M4 |
M4 |
I need to make an index of the running occurance of the part number, and append the count to the part number, like this:
Part number | Index |
AB | AB1 |
AB | AB2 |
1234 | 12341 |
M4 | M41 |
M4 | M42 |
M4 | M43 |
The table is called 'Search file' and it has 10 columns.
Thank you in advance to anyone who can help me out!
Solved! Go to Solution.
Hi, @Anonymous
To add a index column in power editor and create a calculate column below:
Column =
[Part number]
& COUNTAX (
FILTER ( 'Table', [Part number] = EARLIER ( [Part number] ) ),
[Part number]
)
Result:
It is important to note that the Index field does not summarize.
Is this the result you want? Hope this is useful to you
Please feel free to let me know If you have further questions
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
To add a index column in power editor and create a calculate column below:
Column =
[Part number]
& COUNTAX (
FILTER ( 'Table', [Part number] = EARLIER ( [Part number] ) ),
[Part number]
)
Result:
It is important to note that the Index field does not summarize.
Is this the result you want? Hope this is useful to you
Please feel free to let me know If you have further questions
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , I would create the Index in Power Query following this https://www.youtube.com/watch?v=7CqXdSEN2k4
In Summary:
(I can attach a sample file when I figure out how to do it 🙂 )
@Anonymous , Add an index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
and create a column in dax
[Part number] & countx(filter(table, [index] <=earlier([index]) && [Part number] = earlier([Part number])),[Part number])