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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
oldrunner
Frequent Visitor

Creating an Index number in DAX

Hi,
I need to create a column with index numbers by categories. I have for example 100 different customers and a total of 500 invoices. I need to have a unique index number per customer and invoice. So they count need to start with "1" per customer.

Using the index function in the power query editor doesn't work, it always returns an error.

 

Any help is highly apprechiated.

 

 

3 REPLIES 3
oldrunner
Frequent Visitor

Thanks,
Rankx replied with an error. I struggle to concat the customer code and sales invoice code to get a unique key.

 

Create a calculated column on your table using concatenate dax function to create a unique key. Also what is the RANKX error you're getting?

Keith_Fernandes
Advocate II
Advocate II

Try to concat customer_code and Sales_invoice_code to generate a unique key. You can then create an index on this. You can also use RANKX function to get unique count against each value. Try these workarounds.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.