Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all! I've been scratching my head with the following modeling issue... I am importing a Sharepoint List of employees located in different sites... The structure of this list is:
- one site per row
- up to 32 groups of columns with details for up to 32 employes on each site:
I'd need to "somehow" modify the query so that I would end up with the following structure:
- one site+employee per row
- up to 32 rows for one site
- One colum for name, one for Tel, one for email, one for Job, and one as Staff#
Any idea? The worst that came to my mind is to duplicate 32 times this initial query, keeping only one Staff in each duplicated query, and then merge back the 32 queries... pretty weird, right?
Thx for your inputs,
Ben
Solved! Go to Solution.
@Anonymous
Hi, Try with a combination of Unpivot & Pivot.
Check the PBIX.
PD: If you want to mantain the Staff 1,2,3...
Do This:
Regards
Victor
Unpivot should get you real close. Using a sample dummy set I selected all non-site columns and click unpivot. Viola!
In query editor
Result:
Hi Aron,
thx for your input, but it doesn't solve the issue I'm afraid, as this puts for instance for Staff1 the attributes in different rows, whereas we want them in column... 😞
Vvelarde, this is exactly it, thx!!!!!!!
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |