Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello guys, I am here again looking for your help.
I have a dataset with a column called Company Group.
I would like to build a new table based on that column only with the distinct values and an additional row "Total". I need also another column as an Index.
This is what I tried but it didn't work.
Solved! Go to Solution.
Hi @jayala ,
You can create a new table with the following formula:
newCompany = ADDCOLUMNS(DISTINCT('Company'[Company Group]),"Index",RANKX(ALL('Company'),'Company'[Company Group],,ASC,Dense))Best Regards
Rena
Sample data please. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Hi Greg, thanks for your reply.
Please find a screenshot in the main post with sample data.
Hi @jayala ,
You can create a new table with the following formula:
newCompany = ADDCOLUMNS(DISTINCT('Company'[Company Group]),"Index",RANKX(ALL('Company'),'Company'[Company Group],,ASC,Dense))Best Regards
Rena
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 67 | |
| 44 | |
| 33 | |
| 27 | |
| 23 |
| User | Count |
|---|---|
| 144 | |
| 121 | |
| 59 | |
| 40 | |
| 35 |