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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sunnyzags
Frequent Visitor

How to get dynamic index of a column in table

I have a table that changes per country with changes according to slicer for country. At a given moment a particular country is select I have used filter pane to show only top 10 city sales both in table and in pie chart. For reference both look similar to what I have shown below. 

CitySales_leatherSales_tin
A10087
B8087
C7754
D7122
E3467
F6526
G2357
H6514
I3245
J5619

sunnyzags_0-1675099473111.png

Now instead of showing legend of pie charts (as I have one more pie chart in the sheet) I would rather like to have the city columns background colored of the same color code that I want in pie chart. To have it I had created a table with rank and color codes that I need. Now I want the index numbers of each city for the particular selected country and match it with my rank table where I can not merge the relation of a measure with rank table. The rank table is shown below. 

 

rankcolor

1#074E64
2#007FA3
3#30ABCE
4#8DC0DD
5#007770
6#5F7419
7#7E9B21
8#9CBD23
9#808080
10#969696
  
  

I want then for my table to look something similar to this:

sunnyzags_1-1675100024714.png

Of course ,both the background color and pie chart should show same colors. But another problem is I have a slicer which when selected for another country should still follow the same color code ranking as my table. Please help me how could I achieve this. 

 

Thanks in advance 🙂

1 REPLY 1
sunnyzags
Frequent Visitor

Adding to the post, the ranking of cities is based on Sales_Leather + Sales_tin. Though that column is not in the table. I just created a measure and used it in filter. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.