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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
zenisekd
Super User
Super User

Row index in table visal

Hi, 

my customer asked me to add a simple index column to a table visual, which would adjust the order, based on the column in the visual is sorted. In other words, the index column would always go 1234 no matter the column you select (could be sold QTY, could be Sales)...

He wants to simply be able to say that if he looks at sales/qty/or anything else, this is the x companies that are intresting... 

I can simply rank by the sales or by qty, but I am not sure how to approach this.. He just wants row number of the table visual.

Anyone has any idea?

3 REPLIES 3
dk_dk
Super User
Super User

Hi @zenisekd ,

I am not sure my idea is feasible but you can give it a try. You could create multiple measures for ranking the columns based on the different values you have (rank by sales, rank by qty, etc...) You can follow this example.

Then you will end up with two or more different measures for rankings/row numbering.

You can create a simple table that you can use as a slicer in the page to select value you want to show, and then a final measure that changes the measure value based on the slicer selection.

Let's say you have created two rank measures, [rank by sales] and [rank by qty].

You can create a table with one column ("Rank by") and two rows: "Sales" and "Quantity", and put this on a slicer.

Then you can create a new mesure [final rank]

final rank = IF(SELECTEDVALUE(Table[Rank by])="Sales",[rank by sales],[rank by qty])

You may use a switch statement instead if you have many different columns to rank by.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@dk_dk I am aware of this option, but I refuse to use something so complex for displaying something so simple... especially if there might be  + columns and the customer has not decided yet about all of them..

Anyone else please?

That is fair enough - I am hoping someone else has a better solution.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors