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 August 31st. Request your voucher.
Hi,
Please help to create measure to get the sum of average of LC from individual employee id.
Count of Employee ID | Sum of LC (Culculated Measure) | |||
Emp ID | Count of Day | Sum of LC Final | Average LC per month | |
258589 | 21 | 0.395428571 | 0.018829932 | =C3/B3 |
280948 | 9 | 0.446857143 | 0.049650794 | =C4/B4 |
sum of average | 0.068480726 |
Solved! Go to Solution.
Hi @ssk_1984 ,
I suggest you to try code as below.
Average LC per month =
VAR _VirtualTable =
ADDCOLUMNS (
SUMMARIZE (
'Table',
'Table'[Emp ID],
"Count of Day", CALCULATE ( COUNT ( 'Table'[Day] ) ),
"Sum of Final", CALCULATE ( SUM ( 'Table'[LC Final] ) )
),
"Avg", DIVIDE ( [Sum of Final], [Count of Day] )
)
RETURN
SUMX ( _VirtualTable, [Avg] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ssk_1984 ,
I suggest you to try code as below.
Average LC per month =
VAR _VirtualTable =
ADDCOLUMNS (
SUMMARIZE (
'Table',
'Table'[Emp ID],
"Count of Day", CALCULATE ( COUNT ( 'Table'[Day] ) ),
"Sum of Final", CALCULATE ( SUM ( 'Table'[LC Final] ) )
),
"Avg", DIVIDE ( [Sum of Final], [Count of Day] )
)
RETURN
SUMX ( _VirtualTable, [Avg] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |