Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jithinrg
Helper I
Helper I

Create a best model out from a specific dataset

Hi team,

I would like to model this dat in PowerBI.

Scenario: Need to identify the actual sales of each employee listed in the Employee table.

In the sales table, tmp ids are distributed over multiple columns (and multiple emp ids in each with comma delimited) which we need to merge and transpose.

Note: emp table has duplicate emp ids means some emps have to manage multiple teams.

 

Any help would be greatly appreciated.

 

jithinrg_0-1651430598097.png

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

see attched.  you will need to play with the visual more to get what you want but please see if this is what you were after.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
vanessafvg
Super User
Super User

see attched.  you will need to play with the visual more to get what you want but please see if this is what you were after.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thank you @vanessafvg ..I will play around with the model you shared and let you know.

Hi @jithinrg ,

Is there anything else you need help with regarding this post? If not, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jithinrg
Helper I
Helper I

 

hi @vanessafvg ./..thanks for your reply. I'm not sure where to load the files. i have copied the table below.

 

Fact table       
SaleIDPartnersIDTeamLeadsIDManagersIDConsultantsIDSale valueSale dateRegionName
1000-10EMP01,EMP03EMP10,EMP11,EMP45  6000002/03/2021West
1000-20EMP09,EMP98,EMP67 EMP456,EMP765EMP334,EMP77610000006/07/2000East
1000-10EMP01,EMP03EMP555,EMP666,EMP888EMP309,EMP845EMP111,EMP222,EMP333-6000002/03/2021West-Elim
1000-10EMP01,EMP03EMP10,EMP11,EMP45  6000002/03/2021West-Elim
2000-80EMP34  EMP456740388903/12/2021Central
3000-50EMP87,EMP899EMP1000,EMP447  300000004/09/2000North

 

 

Employee dim table (only employees in Sales team) 
EmpIDEmployeeNameTeamSaleTarget
EMP01ATeam 110000
EMP09BTeam 230000
EMP34CTeam 350000
EMP87DTeam 460000
EMP03ETeam 5873333
EMP98FTeam 667999
EMP67GTeam 730000
EMP10HTeam 840000
EMP555ITeam 950000
EMP555ITeam 1080000
EMP1000JTeam 1190000
EMP11KTeam 1210011
EMP666LTeam 1340000
EMP447MTeam 14500000
EMP45NTeam 157800000
EMP888OTeam 164500000

 

 

 

so if i understand correctly

we are combining partnersid, teamleadsid and consultants id into one column with a unique set of empid's?

then we want each empid to have its own   line?

 

then how will that look on each line after the data has transposed  

sale id ,empid, sale, value , sale date,  region name and then each empid has it own line with the full sales value?

 

when  posting  a question its always best to given an example of what you want the result to look like so its clearly understood





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




you are right.

please see the snips below.

Stage 1 merging and splitting

jithinrg_0-1651479308447.png

 

stage 2 transposing

jithinrg_1-1651479330609.png

 

transosing costs the row count, which we needs to eliminated in later stage.

Actually i would like to know what are the best approach to model this kind of dataset and would like to measure each employee's actual sale details vs thier targets.

 

apologies for not posting the examples.

what field defines who made the sale, the partners? consultant?  if there are multiple employees per sale, you would still attribue the total sales value per sales person?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




the list of empids in each column are a part of the sale...hopefully we have to combine all empid fields to make a field for all empids and transpose? not sure whether that approach is correct.

vanessafvg
Super User
Super User

can you provide the data in text format?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors