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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Average of a calculated field

Hello Guys,

I have this table. the numbers are the result of the distinct count founction that I applied on a specific field. Now I need the average of each raw. I 've tried to apply the AVERAGE('TABLE'[CALCULATED FIELD]) but Power BI say the field doesn't exist and underlines that with red line. Please can someone help me?

Ulmat_0-1622726354857.png

Thanks,

Ulrich

1 ACCEPTED SOLUTION
Nathaniel_C
Community Champion
Community Champion

Hello, @Anonymous , not sure what you are looking to do here, but perhaps you could supply the  measure you used, and the expected outcome.  The measure that you wrote with the distinctcount is measure, not a field, and then it looks like you filtered it with the visual using days. So you may have to do something like Calculate([distinctcountmeasure],filtered) or use averagex on your original table.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Any help please?

Hi @Anonymous , not sure how you were trying to do this, but the first pic shows it being done as a table.  The second as a visualization and measure.  The second pic shows the original table that I built, then using the Distinct Count Measure and finally the measure which also uses SummarizeColumns(). I have included the code below.

 

EID Distinct Count = DISTINCTCOUNT('Table'[ID])

======================================

Average EID by Date = 

var _summarize = SUMMARIZECOLUMNS('Table'[Date],"test1",[EID Distinct Count])

var _calc = AVERAGEX(_summarize,[test1])

return _calc
=====================This is what creates the standalone 4.

 

 

Capture12.PNG

 

Capture11.PNG

 
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 





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

Proud to be a Super User!




Will log back later today.
Nathaniel





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

Proud to be a Super User!




Nathaniel_C
Community Champion
Community Champion

Hello, @Anonymous , not sure what you are looking to do here, but perhaps you could supply the  measure you used, and the expected outcome.  The measure that you wrote with the distinctcount is measure, not a field, and then it looks like you filtered it with the visual using days. So you may have to do something like Calculate([distinctcountmeasure],filtered) or use averagex on your original table.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




Anonymous
Not applicable

Hello Nathaniel_C

thanks for your reply. yes, you're right. I created a new measure by applying a distinctcount on a field. let say I have a field named "USER ID". Now I did a distinctcount on that field and I got the value for each week. since I am using a weekending filter (let's say I display the values just for the last 4 weeks), I need the average of that distinctcount measure for those last 4 weeks. 

Thanks,

Ulrich

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors