Forum Discussion
glmoon5
1 year agoHelper I
Index Key
I have a Top_20 table that has [Geographies] as a column listed multiple times because the table also contains Product UPCs and associated sales with them.
I need to create an index on the [Geographies] column so that the index stays the same until a new geography shows in the table. How can I achieve this??
Hi glmoon5 ,
Thanks for reaching out to Microsoft fabric Community Forum.
Based on the sample data as you provided as per the query :- You can create a Geography-based index in Power BI by first sorting the data by Geography.
- Then removing duplicates from a duplicated Geography column, adding an index to that unique list, and finally merging it back with the original table to assign a consistent index per Geography group.
Expected output :
Reference : Add an index column - Power Query | Microsoft Learn
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!