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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 49 | |
| 42 | |
| 25 | |
| 22 |
| User | Count |
|---|---|
| 143 | |
| 118 | |
| 56 | |
| 37 | |
| 31 |