Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Good!
I have a report in Power BI where I show student data with the following columns:
The first 4 columns use a table with student data and the "Pass Rate" column is from a table that was created directly from the BI and is configured with calculated columns, where that is recorded as a pass rate (this is in %).
Now I have the problem that I have to generate a column in that visual that works as an "Index" and that when I use the filters within the table, this column only shows me the row number in a sequential way. For example:
My problem is that, if I sort any of the columns (except the ID one), these numbers are mixed with each other and I need you to only list the rows that are showing and that regardless of the order that they give in the others it continues to be maintained or otherwise, that when I sort by Approval Rate (from highest to lowest) it shows me the index in a correlative way and the amount of rows you're displaying.
Example of the error:
It happens that using several formulas (RANKX, INDEX, among others), it happens to me that only 1 appears, this repeats the data when I add it to the visual among many errors that I have not been able to understand and the solutions that I have sought and adapted have not borne fruit in my report.
If anyone has any ideas or knows how to make that index I would be very grateful!
It seems that you want to create an "index" column to display the row numbers in order, based on the data being filtered or sorted.
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure. Sort the pass rate from highest to lowest based on your filtering, marking it as an indexed column.
index_rankx =
RANKX(
ALLSELECTED('Table'),
CALCULATE(
MAX('Table'[Pass Rate])
),
,
DESC,
Dense
)
Put the measure into visual and manually sort the Pass Rate.
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Good morning!
The measure works in a way, but the following happens to me:
Here's the data without the index when you push it into the table visual:
When I enter the measurement you provided, the following happens:
The rows shown in the report are duplicated, regardless of the filters I have applied to the sheet and table.
I tried applying the filter directly to the measure, but it doesn't work either, it keeps duplicating the data in the report that is shown.