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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
natthachai
New Member

count and average

I look for the response to questions I'm not sure how to ask. I constantly update new information. There are multiple rows in each day. I can count the number of rows. However, I prefer to average across weeks or months. to use this table in power bi. I can configure the specified date to count using the example. But I'm unable to select the average. Please let me know. Should the table have a calculation column added? How do I select and set it up?

 

DateSubjectDetail
2/4/2023VideoVideo provides a powerful way to help you prove your point. 
2/4/2023WhenWhen you click Online Video, you can paste in the embed code for the video you want to add. 
2/4/2023YouYou can also type a keyword to search online for the video that best fits your document.
2/4/2023ToTo make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. 
2/4/2023ForFor example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.
2/5/2023VideoVideo provides a powerful way to help you prove your point. 
2/5/2023WhenWhen you click Online Video, you can paste in the embed code for the video you want to add. 
2/5/2023YouYou can also type a keyword to search online for the video that best fits your document.
2/5/2023ToTo make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. 
2/6/2023ForFor example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.
2/6/2023VideoVideo provides a powerful way to help you prove your point. 
2/6/2023WhenWhen you click Online Video, you can paste in the embed code for the video you want to add. 
2/6/2023YouYou can also type a keyword to search online for the video that best fits your document.
2/6/2023ToTo make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. 
2/6/2023ForFor example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.
2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

I am not entirely sure I understood your question, but you can get the average of the row totals like this:

measure 39 = IF(isblank(SELECTEDVALUE('Table (25)'[Date])), //check if row is total
   
    DIVIDE(counta('Table (25)'[Detail]),COUNTROWS(VALUES('Table (25)'[Date]))), //calculate Average for total row
    counta('Table (25)'[Detail])) //count values


Example:
ValtteriN_0-1676196194596.png

 

Count for months is 5 and 4 respectively and their average is 4.5

I would solve this in dax instead of PQ since your goal seems to be to have a dynamic calculation depending if week or month is selected for filtering.


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I appreciate your suggestion. I'm not sure I can adhere to this instruction. I'm not very good at understanding, but I'll attempt to learn. thanks once again

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.