The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have following problem: I want to calculate average productivity per employee. I need to differantiate that some them are working since 3months, some are working since 9months, some only 2 months. It's easy on employee level (by creating a separate table with calendar and aggregating orders per employee per month, then #orders / #active months), but I don't know how to tackle the same calculation on differante levels of aggregation.
What I want to achieve is to have report, which compares average productivity per employee on BU level (or region, or sales channel etc.)
1. I can't do average from average
2. I need to keep #active months in my mind (and calculation)
3. I don't want to create X tables and do aggregation on each level (also because it would be impossible to keep #active months in the calculation)
My data structure is following:
Year | Month | Business unit | Region | Customer Type | Sales channel | Order channel | Manager | Employee | # Orders
You should be able to do this with a measure that summarizes at the appropriate granularity.
Try something like this:
Productivity Per Employee =
VAR _Summary_ =
SUMMARIZE (
Data,
Data[Year],
Data[Month],
Data[Employee],
"@Orders", SUM ( Data[# Orders] )
)
VAR _Average = AVERAGEX ( _Summary_, [@Orders] )
RETURN
_Average
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |