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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
clarafff
Frequent Visitor

why the average function is not working , both the average function on visualization and Dax

Hi Guys, 

could you help me check what is the problem, my average function is not working on the report. No matter I use the average function on the visualisation field or write the Dax.I want to count the daily average actives. But it just shows ' 1 ' on the result. what kinds of reasons could be ? I have checked the data type, filters ...I don't know why it is like that

clarafff_0-1686775774496.png

 

7 REPLIES 7
Sergii24
Super User
Super User

Hi @clarafff, if you look closely on the selected table, you'll notice the header of the first column "First YEAR_MONTH". If this name has been created automatically there might be an issue with a column data type. "First" means that PowerBI is selecting the first available row with value "2023_05" within column "YEAR_MONTH", therefore the whole table has only 1 row. So your average is correct, as denominator of calcualation is 1. I can't tell you why SUM is working, as I need to see its DAX code before. 

Try to replace "First YEAR_MONTH", for example, to "Country". If the average works, you indentified where the issue is (column "YEAR_MONTH").

If wrtitten above is not a case, pay a close attention to filteter context of your visual: make sure that this context is indeed what you expect (I suggest you to filter all columns one by one accordingly in Data tab to ensure that the final filtered table is the one you expect to apply Average formula on).

Hope it helps!

Sergii24_0-1686811895343.png

 

Hi Sergii24,

I have tried many ways, but I'm still not be able to find the probelm . Could you please help me check what is wrong with my file?Active users.pbix - Google Drive

Hi @clarafff, can you check the link once again?

Sergii24_0-1691423090306.png

 

PhilipTreacy
Super User
Super User

Hi @clarafff 

 

Download example PBIX file

 

Not sure what you are doing because it works ok for me - please see example PBIX file above.

 

avger.png

 

You've got a date Table connected to the Fact_seo_user table?

 

I'd need to see your file to check any further.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


exactly, the function is working on another report, but not working on this one, I wonder what's the problem ? yes , the tables are connected....

Hi @clarafff 

 

Need to see your file please.

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Philip, I still didn't find out the problem. could you please help me to have a look and point out the bug, thx!

the test file (PBI)

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors