Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sg919
Frequent Visitor

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 3
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.

v-jianboli-msft
Community Support
Community Support

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.

Hopefully you can access this link:  Example.pbi file 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.