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,
I am currently working on migrating the tableau report to power bi.
In tableau , they have used index() function for creating index in visual dynamically.
the index will change according to the column we have added in the visual.
How to achieve the same in Power BI? I am not able to get it by creating index column and using measures as well.. Any help or leads is really appreciate..
here is the sample data :
Thanks in advance
Hi rajendraongole1 ,
I tried your way. But, it didn't help.
The index should work in dynamic way.
For example, I have table containing Country, Product and sales columns in it. If it add country and index column, it should work like as mentioned below.
country | index |
us | 1 |
brazil | 2 |
canada | 3 |
and if add product column to the above table, it should work like..
country | products | index |
us | mobile | 1 |
laptop | 2 | |
brazil | chair | 1 |
desktop | 2 | |
canada | transport | 1 |
calculator | 2 |
I hope I can make you understand my question better now. Please let me know if any further data required.
Thanks
Hi @Anonymous - In Power BI, you can create a dynamic index similar to Tableau's INDEX() function by using DAX (Data Analysis Expressions). This index will adjust according to the columns you add in your visualizations.
using calculated column
Index = RANKX(ALL(Sales), Sales[SalesAmount], , ASC, Dense)
you can create dynamic index() using dax or in power query editor also we have a functionality to add index column .
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |