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
Anonymous
Not applicable

Merging Queries using SharePoint lists

  Hi All,

I am working on a project where majority work in based on Power BI reports. These are the customer requirements.

 

  1. I t’s a basically of the HR system where HR managers for specific regions (Indonesia, Thailand, Singapore, Japan etc.) would be filling in the employee information such as number of employees, average salary for 6 months, number of training completed, number of years in services, Age profile for each region, etc.

    HR Admins will be filling these numbers within SharePoint  form.

    Company split the financial periods into two: 1st FY2017 and 2nd FY2017.

    This is sample proof of concept form that prepared for the customer:


    01 Form.jpg


  2.  I have designed the following Lists so that I could model them using Power BI and create reports for each region and other parameters that is described above  

  3.  List 1: Region (aka Country)

    Title column field and I renamed title field to Region as follows: 

    01 Region Title and ID.jpg

  4. List 2: Subsidiary

    Regions could have one or more subsidiary and I again lookup that refer to region as follows:

    02 Subsidalry Name.jpg03 List Design subsidary'.jpg



  5. List 3: Exchange Rate


    Each region could they own currency and I again used Region lookup for exchange rate as follows

    04 Exchange Rate Contect.jpg04 Exchange Rate Contect.jpg

  6. List 4:  HR Dashboard.

    It’s the main list that stored all the information such as in the employee information such as number of employees, average salary for 6 months, number of training completed, number of years in services, Age profile for each region, etc. and it lookup to other lists for regions, subsidiaries and exchange rate and it’s for the scalability of the application and admins can add more regions, subsidiaries and exchange rate at the later stage.

    These 3 rows are sample data. 

    06 HCM Content.jpg


    IN POWER BI DESKTOP 

  7. I need to show a report for all these lists, Exchange Rate, HR Dashboard, Region and Subsidiary as follows: 

    08 All Lists.jpg

  8. The relationships are using ID columns:

    07 Relationship by ID only.jpg

  9. From the HR Dashboard list, I dragged Period and RegionID (Lookup to Region list) I dragged Region column and then I dragged  Subsidiary column

    and it resulted in this:
    09 Result Set.jpg


when I merge the lists using inner join, it joins using ID which I can’t use it for my purpose.  

10 Merge uses ID for joining the data.jpg


How could I join those 4 lists so that I could use Bar chart and stacked column chart for my reports?   

Any help would be highly appreciated.   



1 ACCEPTED SOLUTION

Hi @Anonymous,

 

1. You can add Region to the Legend of the visual.

2. Do you have any source data? You only have summarized data in the HR Dashboard. How to update the totals? The formulas of turnover have to be hardcoded.

Merging Queries using SharePoint lists1.JPG

 

 

 

 

 

 

3. You can delete the old relationships and rebuild new ones. Or double click the relationship to make changes. Merging Queries using SharePoint lists .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4. To be honest, it's easy to create a visual. Drag the columns to the fields. 

 

Best Regards!

Dale

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

View solution in original post

11 REPLIES 11
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

The relationships could be wrong. Though they are all called "ID", they have different meanings. If we establish proper relationships, we don't need to merge the tables. We can create some measures and plot them in the visuals. Could you please post a sample in TEXT mode? The dummy PBIX file would be great. I can't give any more suggestions without a sample.

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-jiascu-msft and Dale ...

 

Sure ...I will supply the sample shortly what the client is looking for 

Anonymous
Not applicable

@v-jiascu-msft 

 

Client is looking for regional dashboards (Indonesia, Thailand, Singapore, Japan etc.) and GLOBAL Dashboard (All Regional) 

 

These are samples of GLOBAL Dashboards 

01 Gobal FTPE.jpg

02 Gobal PCE.jpg

03 Gobal Employment Turnover.jpg

03 producutivy Loss.jpg

04 Years Service.jpg


05 Managers and Non Managers.jpg


These are sames of Regional Dashboards 

06 Regional FTPE.jpg

07 Regional Emp Turnover.jpg


07 Regional Age.jpg


08 Regional Training.jpg


Please Advice how could use my design to gerenarte these charts and dashboards? 

Anonymous
Not applicable

Regional Dashboards such as Indonesia will have its own Indonesia subsidiaries which I have indicated as BU1, BU2, BU3 etc.  

Each Region SHOULD NOT be able to view other regions such as Japan, Thailand etc. for the confidentiality purposes but the GLOBAL HR should be able to view all the regions.

Hi @Anonymous,

 

To be honest, I can't do much without source data. Only some suggestions.

1. Creating visuals could be easy. Drag columns into fields. 

2. Calculated columns and measures could be needed.

3. How do you want them to use the Dashboards? Create dashboards themselves? Or share to them and view only?

4. You can apply RLS (Row-level-security) to separate the regions. 

 

If you can provide the dummy PBIX file (your file with four tables), that would be great. 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-jiascu-msft and Dale. 

 

Totally got you ...

Will provide the PBIX file with sample data shortly ...

 

Thanks a ton!

Anonymous
Not applicable

 

@v-jiascu-msft

 

Please find attached Sample - HR.pbix file  

 I will be using Power BI free edition and not the Power BI Pro edition.


Q: Is RLS available on the Power BI free edition?  

Design data where users would be storing.

Design Tables.jpg


This is the main data form where users would be filling.  

main form data.jpg


This is the main HR dashboard data structure multiple fields and three lookups fields to region, subsidiary and exchange rate as follows: 


05 Region Data Stctcure.jpg

Each region would be its own subsidiaries as follows:

06 Sub List Data.jpg
and this is the subsidiaries data structure
07 Sub List Stcrtcure.jpg


Exchange Rate Data:

07 Rate Data.jpg

Exchange Rate Structure:

08 Rate stsrcure.jpg

Power BI Desktop 

These are the all the fields from those 4 SharePoint lists:


04 Power BI Desktop Fields.jpg



In the relationship tab, HR dashboard has no relation with other lists.

11 HR with Region.jpg


I made one-to-one relation for HR Dashboard and Region. and mapped RegionID of the HR Dashboard list to the Region list. 

10 HR with Region.jpg

11 HR with Region.jpg


So I looking for charts and dashboards that I showed above.


Thanks for your help.

Hi @Anonymous,

 

Please check out the file: https://1drv.ms/u/s!ArTqPk2pu-BkgR8FU0DpC82dp9Y9.

What I have done:

1. Rename 'exchange rate'[id] to 'exchange rate'[exchangeRateID];
2. Rename 'subsidiary'[id] to 'subsidiary'[SubsidiaryId];
3. Rename 'region'[id] to 'region'[RegionID];
4. Change relationships;

5. Create two visual.

 

Merging Queries using SharePoint lists.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Questions:

1. No "bu1", "bu2", "bu3" in the model. So I can't create a visual with them.

2. How to define these terms? There are PCE and FTPE. For example: Turnover.

 

Your question: Is RLS available on the Power BI free edition?

A: Yes, RLS is available for all accounts. But sharing is only available with Pro licence.

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks a ton @v-jiascu-msft and Dale 

 

Questions:

1. No "bu1", "bu2", "bu3" in the model. So I can't create a visual with them.

The requirements are each Region such as India will have its own Subsidiary which in my example are Mumbai and Delhi.

01 Regional FTPE India.jpg

2. How to define these terms? There are PCE and FTPE. For example: Turnover.

Company defined Employee Turnover as follows

No of Full-Time Employees (FTSE ) + No of Permanents Contract Employees (PCE) for 1st Half 2017= 99

No of Full-Time Employees (FTSE ) + No of Permanents Contract Employees (PCE) for 2nd Half 2017= 108

In 1st Half 2017, No of Hirers = 0
In 2nd Half 2017, No of Hirers = 0


In 1st Half 2017, No of Hirers = 2
In 2nd Half 2017, no of leavers = 12,


Employee Turnover is computed as for 1st Half 2017 = [(0 /((99 + 99)/2)]*100 = 0
Employee Turnover is computed as for 2nd Half 2017 = [(2 /((99 + 108)/2)]*100 =0.0193 ~ 0.02
I guess, DAX can be used for this.


02 Regional  India Emp Turnover.jpg


03 Imagejpg.jpg


Q: Could you please show how you change the relationships?
 Is it possible for samples Visuals for BUs and Employee Turnover?

Thanks!

Hi @Anonymous,

 

1. You can add Region to the Legend of the visual.

2. Do you have any source data? You only have summarized data in the HR Dashboard. How to update the totals? The formulas of turnover have to be hardcoded.

Merging Queries using SharePoint lists1.JPG

 

 

 

 

 

 

3. You can delete the old relationships and rebuild new ones. Or double click the relationship to make changes. Merging Queries using SharePoint lists .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4. To be honest, it's easy to create a visual. Drag the columns to the fields. 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-jiascu-msft and Dale for all your help ...

 

I am able to generate reports via Power BI ..

Thanks again!

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.