Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
On my Power BI report, I have a visual table that fetches columns from several tables.
And I'd like to create an index in this visual but I don't know how to do it?
Does anyone have a solution?
Best regards
Solved! Go to Solution.
@Charline_74 , You can create a column or measure using RANKX function
For calculated column
Index = RANKX(ALL('Sales'), 'Sales'[OrderDate], , ASC, DENSE)
For measure
IndexMeasure =
VAR CurrentRow = MAX('Sales'[OrderDate])
RETURN
RANKX(ALL('Sales'), 'Sales'[OrderDate], CurrentRow, ASC, DENSE)
Proud to be a Super User! |
|
Hi, @Charline_74 If you don't have column with unique values, and have multiple columns in the table, then you can use rownumber function to create index column with a combination of all the columns in your table. For example,
@bhanu_gautam & @manvishah17
how do I do this when none of my columns contains unique data?
Here's the result I got :
You can merge two column using concat and create some unique values if possible in your table
Proud to be a Super User! |
|
@Charline_74 , You can create a column or measure using RANKX function
For calculated column
Index = RANKX(ALL('Sales'), 'Sales'[OrderDate], , ASC, DENSE)
For measure
IndexMeasure =
VAR CurrentRow = MAX('Sales'[OrderDate])
RETURN
RANKX(ALL('Sales'), 'Sales'[OrderDate], CurrentRow, ASC, DENSE)
Proud to be a Super User! |
|
User | Count |
---|---|
123 | |
76 | |
63 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |