cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SirGalatsi
Advocate III
Advocate III

Logic Issue (Added raw data for context)

Hi Folks,

 

I have 2 fields: Manager Name & Employee Type in which I need to use as criteria for a formula. What I want to do is create a measure or calculated column in a table visual that looks at the Manager name and then looks at employee type to return whether the manager is managing just employees, contractors or employees & contractors. I'm working on a manager reconciliation exercise. Employee Type only has two options: Employee and Contractor

 

So for example, the output would look like this in a table visual:

 

Manager ID                    Manager Name                      Managing?

11112                             Frog, Kermit                            Employees Only

12231                             Blue, Gonzo                            Contractors Only

12334                             Piggy, MIss                             Employees & Contractors

 

Raw data looks like this: 

 

EE ID#Employee NameEmployee TypeManager IDManager Name
5445645asdqweqeqw, BContractor50038Blue, Gonzo
8787484Addlk, AkowEmployee142275Dog, Rowlf
158455asdad, AEmployee142475Frog, Kermit
45654Awdaekeqw, AsdasContractor32195Piggy, Miss
564564Aoiureewiruwireu, asdkjaEmployee32195Piggy, Miss

 

 

I tried a few different logic scenarios but I can't seem to get it right. Any help would be great please. Thanks!

4 REPLIES 4
v-danhe-msft
Microsoft
Microsoft

Hi @SirGalatsi,

Based on my test, you could refer to below steps:

Copy your row table and use the group by function.

1.PNG

 

 

Apply it and create a calculated column.

Type = IF([a]="Contractor"&&[b]="Contractor","Contractors Only",
IF([a]="Employee"&&[b]="Employee","Employees Only","Employees & Contractors"
))

Now you can see the result.

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/lg8q8nd276u6yoo/Logic%20Issue%20%28Added%20raw%20data%20for%20context%29.p...

 

Regards,

Daniel He

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

Hi @v-danhe-msft,

 

Thank you for this. Unfortunately, I cannot seem to do that as "Employee Type" is a group I used to roll the 7 different types of people into two buckets. I tried doing it as a calculated column, but wouldn't show up on field list. 

 

Is there an alternate way? 

SirGalatsi
Advocate III
Advocate III

Added example raw data for context.

Bump. Anyone please?

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors