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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
yaman123
Post Patron
Post Patron

'Role' column to show persons role for a monthly report

Hi all, 

 

I am looking to have a 'role' column created to show the role of the person in the company. Roles can change depending on the persons cost centre and site. From dataset below. emp 123456 should show as role 'Customer Services' as cost centre is 225 and site HO. Previous to this, emp was in role 'Finance' as cost centre was 101 and site UK. 

 

I will need the correct roles to show for a report which is run monthly. So if i select Apr 2024, 'Customer Services' should show as the role, but if I select Sept 2022, 'Finance' should show as the role for that month. 

 

Dataset below: 

EMP_NOPROPERTY_CODEPROPERTY_DESCPROPERTY_VALUEVALID_FROMVALID_TO
123456SITESiteUK03/09/201930/09/2022
123456COSTCTRCost Centre25003/09/201910/06/2020
123456COSTCTRCost Centre10111/06/202030/09/2022
123456SITESiteHO01/10/202231/12/9999
123456COSTCTRCost Centre22501/10/202231/12/9999
9 REPLIES 9
ryan_mayu
Super User
Super User

@yaman123 

pls check if this is what you want

11.PNG12.PNG

 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

 

I am looking to have a new column created to show the 'Role' of the employee. So first screenshot would show a role column with 'Finance' and second screenshot would show 'Supply Chain' 

do you want to add a role filter? or just add the role info in the table? 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




add the role info as an additional column 

i think you must have another mapping table. could you pls provide that?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Unfortunately there is not another mapping table which is probably not best practice. 

Then how can we know to display finance or customer services?  

maybe you can try something like below.

Measure = SWITCH([costcener],"225","Customer Services","101","Finance")
 
11.PNG
 
i can only display two department because i don't know the whole mapping relationship between costcenter and department




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




the role is depending on the cost centre and site. I will need the report to pull through the correct role per month. If there has been no change in roles, then the latest role for the employee should show 

you need to provide the role mapping table, otherwise it's impossible to provide the solution. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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