Forum Discussion
natthachai
3 years agoNew 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 ac...
ValtteriN
3 years agoCommunity 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:
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/
Example:
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/
- natthachai3 years agoNew Member
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