Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I would like to making index key for my product in table visualization. My table look like this
UniqProductID | ProductName |
156 | A |
156 | A |
964 | B |
789 | C |
789 | C |
I using this dax in my measure
Index | UniqProductID | ProductName |
1 | 156 | A |
1 | 156 | A |
2 | 964 | B |
3 | 789 | C |
3 | 789 | C |
Index | UniqProductID | ProductName |
1 | 156 | A |
1 | 156 | A |
2 | 789 | C |
2 | 789 | C |
So, Index field will be dynamic per filter selection. How to write dax as per expected result.
Thank you.
EDITED
Hi @Supakit_1
Try this measure:
index =
RANKX (
ALLSELECTED ( tblProduct ),
CALCULATE (
MAX ( tblProduct[ProductName] ),
ALLEXCEPT ( tblProduct, tblProduct[ProductName] )
),
,
ASC,
DENSE
)
Output:
You can also download the file: https://gofile.io/d/4JJQpK
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |