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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
MartynasBI
Frequent Visitor

Calculating average based on a text column

Hi,

I have a following sample of the data set. I would like to be able to calculate the average based on a text column (please refer to the “Update” column).

MartynasBI_0-1686748351098.png

 

From this data there are 6 total ‘updates’, 4 in W1 and 2 in W2, and the average should be 3 ‘updates’. How could I get this average value in Power BI?

 

Many thanks,

3 REPLIES 3
Kishore_KVN
Super User
Super User

Hello @MartynasBI 

You can use count and distinct count combination to achieve this. 

DAX looks a below:

Average = 
Var A = COUNT('Counting Weeks Data'[Update])
Var B = DISTINCTCOUNT('Counting Weeks Data'[Week])
Return
DIVIDE(A,B,BLANK())

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

Hi @Kishore_KVN ,

 

Unfortunately it did not work. Apologies, my provided data might not have been fully representative of what I am working with. Please find the below data set example

MartynasBI_0-1686811301433.png

 

The goal remains the same - to calculate the average updates per week.

 

Thanks

Can you please share the expected output as well!!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.