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

Grouping for new column, Evaluating multiple columns to assign same groups a value

I have a list of teacher_ids and all of their payroll data, previously joined with data on certification programs they have completed. The (program) column is redundant and inconsistent with pay period date (date). The program column was assigned to every row of payroll data. 

 

The rate change column was previously calculated to flag a change in salary between pay periods. 

 

With all that, my end analysis goal is to come up with a count of teacher_ids that completed the program AND also saw a rate change >10%. If they completed the program but did not see a rate change, I want to label that count of teachers as well. Also... a third label being teachers that did NOT complete the program. 

 

That's all to say that I have no idea how to go about this. I essentially need to group by teacher id and evaluate two columns (rate change and program).. but I need to evaluate it row by row since the sum of rate change by teacher id won't work.. my measure needs to look at rate change by row, by teacher id. 

 

Any DAX, or logic input would be helpful. Thank you all!

 

Sample data: 

 

teacher_idspayroll daterate changeprogram
11-Jan0%completed
11-Feb10%completed
11-Mar0%completed
21-Jan0%completed
21-Feb0%completed
21-Mar0%completed
31-Jan10%null
31-Feb0%null
31-Mar0%null
1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

That's all to say that I have no idea how to go about this. I essentially need to group by teacher id and evaluate two columns (rate change and program).. but I need to evaluate it row by row since the sum of rate change by teacher id won't work.. my measure needs to look at rate change by row, by teacher id. 

 

Could you please clarify more details about your requirement above? If possible, please give the output resut.

 

Regards,

Jimmy Tao

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