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

Assignment of rows

Hi

 

I am looking for a formula that checks how many rows have already been assigned to an employee for example, if an employee has more than the a average of the rest of the employees, then flag. I would want the amount of rows that they have been over assigned to be reassigned back to the rest of the employees so everyone has in and around the same amount of rows. 

 

Kind regards,

Katie 

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create measure like DAX below.

 

CountFlag= COUNTX(SUMMARIZE(ALLSELECTED(Table1),Table1[employee],"_flag", IF( MAX( Table1[Employee Value])> AVERAGE( Table1[Employee Value]),"flag") ), [_flag] )

 

If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

Anonymous
Not applicable

Hi,

 

Thanks you so much for getting back to me on this as

 

I have wrote the logic out in the attached file, let me know if it is not clear.

 

What I have is in green, & what I need is highlighted in red

 

Doc IDCountry 1Assigned to column Count of workflowsReassignFinal count of workflows
 Divide doc ID's that are from country 1 between 2 employees Reassign all other Doc ID's equally between other employees but also assign some of these to Country 1 employees (Using the RAND BETWEEN function to assign)Count of occurancesI need a column to identify that that Employee A has gotten too many Doc ID's and to take away some of the Doc ID's from them and reassign them back to Employee B & C so that all employees have a similar amount of Doc IDs. (It is okay if not a even split as RAND BETWEEN function does not give this)Count of occurances
1 Employee B4Employee B5
2Employee AEmployee A8Employee A5
3 Employee B4Employee B5
4 Employee C3Employee C5
5 Employee A8Employee B5
6 Employee A8Employee A5
7Employee AEmployee A8Employee A5
8 Employee B4Employee B5
9 Employee C3Employee C5
10 Employee C3Employee C5
11 Employee A8Employee C5
12Employee AEmployee A8Employee A5
13 Employee B4Employee B5
14 Employee A8Employee C5
15Employee AEmployee A8Employee A5

 

Kind regards,

Katie

amitchandak
Super User
Super User

@Anonymous ,

compare these two

 

countrows(table)  and averageX(summarize(all(table),table[emp],"_1",countrows(Table)),[_1])

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.