Forum Discussion

sg919's avatar
sg919
Frequent Visitor
3 years ago

Include Blank Values in Summarize and AverageX Calculation

Hello - firstly let me begin with I am a novice DAX / PowerBI user.  I have searched and found many similar questions, however don't have the skillset to modify my query for my needs.  Any assistance would be greatly appreciated!

HERE IS THE MEASURE I CREATED:

 

 

 

Avg Calls/Day Week =
VAR CalcTable =
SUMMARIZE(
    'Call Activity',
    'Call Activity'[Employee_ID],
    'Call Activity'[Call_Dt (bins)],
    "#Calls",DISTINCTCOUNT('Call Activity'[Call_ID]))
RETURN
AVERAGEX(CalcTable,[#Calls])

 

 

 

 
ISSUES:

- the average calculation does not include where employee has ZERO calls for a particular week.

- there are some weeks where employee has no calls and they are not being included in the average calculation.

- the rollup at the MANAGER level and TOTALS should be average for # of weeks displayed (in this case 5 however this is dynamic and views may change to show more weeks)

- Note:  I do have another table which houses ALL employee data.  I could pull employee ID from the "employee" table if that helps.

 
EXAMPLE OF DATA RESULTS THAT I AM GETTING

NAME8/218/289/49/119/18TOTAL
MANAGER139911 9
KEN10 1512 12
MEL159210 9
 
EXAMPLE OF DATA RESULTS I WANT TO SEE:
 
NAME8/218/289/49/119/18TOTAL
MANAGER135911 08
KEN100151207.4
MEL15921007.2
 
Thank you in advance!

3 Replies

  • Hi sg919 ,

     

    Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

    Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Refer to:

    How to provide sample data in the Power BI Forum

    How to Get Your Question Answered Quickly

     

    Best Regards,

    Jianbo Li

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

  • sg919's avatar
    sg919
    Frequent Visitor

    v-jianboli-msft Quick Note:  original question was for the Call Activity table.  Example I provided is for Opportunity table.  Trying to achieve the same objectives though.