Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi Folks,
I am not sure how do i asiign same groupids to the rows that have same values across multiple column and also if possible add a flag for duplicacy. So I have a table that looks like below:
| UniqueID | InvNumber | InvComp | InvRefrence | InvGrossAmount |
| 1 | INV1234 | 121 | Test | 203.12 |
| 2 | INV1234 | 121 | Test | 203.12 |
| 3 | INV5678 | 72 | Pass | 677777 |
| 4 | INV1123 | 234 | Loan | 23070 |
| 5 | INV5678 | 72 | Pass | 677777 |
In the same table, I want to add an additional column to assign the same groupID wherever the values for the below column are same.
| InvNumber | InvComp | InvRefrence | InvGrossAmount |
After adding the columns the desired table should look like below: Line 1 and 2 have the same value across an hence have the same groupid and flag as TRUE for duplicacy.
| UniqueID | InvNumber | InvComp | InvRefrence | InvGrossAmount | GroupID | Duplicate |
| 1 | INV1234 | 121 | Test | 203.12 | 1 | TRUE |
| 2 | INV1234 | 121 | Test | 203.12 | 1 | TRUE |
| 3 | INV5678 | 72 | Pass | 677777 | 2 | TRUE |
| 4 | INV1123 | 234 | Loan | 23070 | 3 | FALSE |
| 5 | INV5678 | 72 | Pass | 677777 | 2 | TRUE |
Is there a way I can achieve the above using DAX query only. The connection for the powerbi file is going to the Diret query mode and hence, appreciate any solution that will work for direcy connection.
@AP_S , Create a Rank
Group ID = Rankx(Table, Table[InvNumber], ,asc,dense)
Duplicate =
if(countx(filter(Table, [InvNumber] = earlier([InvNumber]) ),[InvNumber]) +0 >1, True(), false())
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |