Forum Discussion

glmoon5's avatar
glmoon5
Helper I
1 year ago
Solved

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 [Geogr...
  • v-aatheeque's avatar
    v-aatheeque
    1 year ago

    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!