The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
New to DAX and need to calculate the average number of widgets produced per employee for each day, week, and month - at several levels including Operator, Division, and Location. I've tried a few variations of AVERAGEX and am getting strange or blank results. Any help would be much appreciated. Thanks in advance. Mocked up data with expected results.
Year Month | Widget Count | Employees | Operator | Division | Location | expected results | Widgets per Employee per month |
202201 | 91 | 6 | A | 1 | CO | all locations | 101 |
202202 | 129 | 6 | A | 1 | CO | operator b | 118 |
202203 | 109 | 6 | A | 1 | CO | operator a | 54 |
202201 | 452 | 8 | B | 3 | FL | division 2 | 70 |
202202 | 445 | 8 | B | 3 | FL | colorado | 63 |
202203 | 490 | 8 | B | 3 | FL | florida | 173 |
202201 | 118 | 9 | B | 2 | CO | ||
202202 | 214 | 9 | B | 2 | CO | ||
202203 | 295 | 9 | B | 2 | CO |
Solved! Go to Solution.
@devally86 , if Widget Count and employee are measures , then a new measures
divide([Widget Count], [Employee])
if they are columns create new measure like
divide(Sum(Table[Widget Count]), Sum(Table[Employee]) )
@devally86 , if Widget Count and employee are measures , then a new measures
divide([Widget Count], [Employee])
if they are columns create new measure like
divide(Sum(Table[Widget Count]), Sum(Table[Employee]) )
That was my issue - measure vs a calculated column, and I was overthinking... Thanks for your help
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |