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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Hems
Frequent Visitor

Calculate average in matrix visual

DatasetDatasetNeed to add another column AVG Employee Destination and AVG Employee NameNeed to add another column AVG Employee Destination and AVG Employee Name

1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @Hems 

 

You need to create a measure as follows and add this to your matrix:

 

Average ID per Emp Designation = 

Var _1 = COUNTROWS ('Table' )
VAR _2 = DISTINCTCOUNT ('Table'[Employee Designation] )

RETURN

DIVIDE ( _1 , _2 , 0 )

 

This will ensure that each Employee Designation calculates the IDs associated with each, but also provide you with the average in the column total.  Output like below:

 

TheoC_0-1652063096501.png

 

PBIX file is attached. I hope this helps.

 

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

5 REPLIES 5
TheoC
Super User
Super User

Hi @Hems 

 

You need to create a measure as follows and add this to your matrix:

 

Average ID per Emp Designation = 

Var _1 = COUNTROWS ('Table' )
VAR _2 = DISTINCTCOUNT ('Table'[Employee Designation] )

RETURN

DIVIDE ( _1 , _2 , 0 )

 

This will ensure that each Employee Designation calculates the IDs associated with each, but also provide you with the average in the column total.  Output like below:

 

TheoC_0-1652063096501.png

 

PBIX file is attached. I hope this helps.

 

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Hems
Frequent Visitor

Thank you very much 🙂

Hems
Frequent Visitor

DatasetDatasetNeed to add column calculate average of emp designation and avg emp nameNeed to add column calculate average of emp designation and avg emp name

Hi @Hems 

 

Can you post sample data as text and expected output?

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

More than welcome @Hems 

 

All the best 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.