Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Need some help with creating an index column in non Power Query interface.
Data table is made up of multiple appended data tables in Power Query. Performing data sorting and creating Index column in Power Query mode induced a long loading time. How do I create a calculated column to add an index column to the data table?
Data is sorted primarily by the Test hours column and would like to create an index column based on the ascending order of the Test hours column. However, there are multiple test data that is captured at the same Test hour for the same Serial. Example of the test data not shown, too many columns. Index column cannot have repetitive values as subsequent calculations and data filtering will reference to this index column.
Solved! Go to Solution.
Hi, @WKN
According to your description, using DAX in desktop won't accomplish what you need if you only have two columns of data displayed without a unique identifier column. If necessary, you can add the unique identifier column and then use Rank, RANKX, ROWNUMBER functions.
You can submit an idea for here and the product team will take note of such a need.
Related Link: New tab (powerbi.com)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @WKN
According to your description, using DAX in desktop won't accomplish what you need if you only have two columns of data displayed without a unique identifier column. If necessary, you can add the unique identifier column and then use Rank, RANKX, ROWNUMBER functions.
You can submit an idea for here and the product team will take note of such a need.
Related Link: New tab (powerbi.com)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi,
Continued with further online search and found below article,
Count duplicate values and number them as 1,2,3.
Basically created another column to count the duplicates of the repeated Test hours. This enable an identifier per row for repeated Test hours. Not perfect though but good enough for now. Have yet to try a combination of Rank, RANKX, ROWNUMBER functions. Ok will consider submitting an idea for creating an index column based on only one data column with repeated row values.
Thanks to all who responded to this query.
Hi @Uzi2019
To create an index column in Power BI without using the Power Query interface, you can leverage DAX to calculate the index based on your sorting criteria. Here’s how you can achieve this:
Create a New Calculated Column:
Write the DAX Formula:
Index = RANKX( ALL('YourTableName'[Serial]), 'YourTableName'[Test Hours], , ASC )
Explanation:
Considerations:
Remember to adjust the formula according to your specific table and column names.
Hi,
Thanks for the suggested DAX formula. I tried the formula with reference to Test hours column and because the other columns are test data results captured during tests, they are not columns with consistent incrementing values of similar properties to Test hours. Hence the following DAX formula resulted in mutliple similar Index values.
Is there a way to create a column to assign incrementing values to the rows with same Test hour then combine it with Test hours column i.e. making a new incrementing column, then generate a non repetitive Index column with RANKX formula?
Hi @WKN
Steps to follow:
Go to Transform Data
Go to power query and go to Add columns > Index column
I hope I answered your question!
Hi,
Thanks for your response. I would like to create the Index column with DAX because in Power Query mode, it just takes too long to load when I exit Power Query mode.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |