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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Community Champion
Community Champion

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.