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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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