Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I'm working with a dataset that contains multiple clients, all who have multiple unique identifers. Clients can match based on any of the Code datafields that are listed below (I've bolded all matching identifers). In this example, 4 client records are listed but there's truly one single person referenced in all 4 records. I'd like to be able to identify all unique people in my dataset using the desired index column listed at the end of the table.
In my real dataset, there are at least 9 datafields that I use to identify clients, but unforuntately, none of these fields are able to match every single record that could possibly belong to each unique client.
Is there a way to utilize the Group By feature to get the desired indexing?
Client Name | Code 1 | Code 2 | Code 3 | Desired Indexing |
Bob Greeny | abc | 123 | V | 1 |
Bobby Green | abc | 999 | T | 1 |
B. Greene | qrs | 123 | F | 1 |
Bob J. Grenne | ipq | 777 | F | 1 |
Thanks,
HI @SDream7
Yes, there is! One question though, are the values in those codes unique to a user, or could the Code 1 of "ABC" ever be used by another person
Ewww... that looks painful.
No exact solution, and I'll be keeping an eye out for replies ...
... but, for me, that sort of logic/business rules of how these clients are identified would be sorted out upstream or as a bit of pre-processing before PowerBI gets to use the data. SQL queries, Excel formulas and macro's ... whatever... and THEN send it on to the visualisation of PowerBI using the PowerQuery Editor.
Why? Maintanence and having logic in a clearly found module (for adjustments) separate from the use of clean and concise data used for visualisation, not buried in a PBIX file...
Yes it's just a bit more complexity in the flow of data processing but it can help with the end goal of using PowerBI to show data related to identified clients ... I'm questioning whether it's PowerBI's role to work out how those clients are identified from conditional statements.
my 2c. YMMV.
I completely agree! I'm a Power BI novice, so I'm still working on how to manage and prepare data. All I have avaliable to me is power bi and excel. Unfortunately however, my excel skills aren't advanced enough to develop VBA codes to automate identification so I'm stuck using Power BI to complete this identification. 😞
hmmm... if it went though an access database first...
TblClients
---------
ClientID
ClientName
TblTransactions
---------------
Code1
Code2
Code3
CodeN
IndexField
Select TblClients.ClientName, TblTransactions.IndexField, TblTransactions.Code1 as ClientCode
From TblTransactions InnerJoin TblClients
On TblClients.ClientID = TblTransactions.Code1
UNION
Select TblClients.ClientName, TblTransactions.IndexField, TblTransactions.Code2 as ClientCode
From TblTransactions InnerJoin TblClients
On TblClients.ClientID = TblTransactions.Code2
UNION
Select TblClients.ClientName, TblTransactions.IndexField, TblTransactions.Code3 as ClientCode
From TblTransactions InnerJoin TblClients
On TblClients.ClientID = TblTransactions.Code3
UNION
Select TblClients.ClientName, TblTransactions.IndexField, TblTransactions.CodeN as ClientCode
From TblTransactions InnerJoin TblClients
On TblClients.ClientID = TblTransactions.CodeN
I'm sure there's a less clunky way to do it with self-joins, but it's 1am here so...
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |