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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Average a Measure

Hi,

 

DepartmentNameDays365
financeJimmy51%
ITJohn21%
ITGreg31%
LegalNick51%
LegalTom10%

 

I had a pbi file like above. Here are the descriptions for each column.

 

Department: It is conditional column based on each employee's business unit number.

Employee: Straight from the excel file

Days: Used a measure Distinctivecount to count the days based on a period of transactional data.

Days/365: Days/365

 

Now I would like to know the average time spent on employees based on business unit, the result is like below.

 

DepartmentAverage Days365
finance51%
IT2.51%
Legal31%

 

Just wonder how to get this "average days", what measure I should use?

 

Thank you!

 

 

4 ACCEPTED SOLUTIONS
az38
Community Champion
Community Champion

Hi @Anonymous 

ifyour dat field is a measure, it looks like you should use AVERAGEX() function https://docs.microsoft.com/en-us/dax/averagex-function-dax 

like

Average Days = CALCULATE(AVERAGEX(Table,[Days]), ALLEXCEPT(Table, Table[Department]) )

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

Anonymous
Not applicable

Sorry I am a bit confused with the"Table" in the measure - could you please explain what it means?

 

Average Days = CALCULATE(AVERAGEX(Table,[Days]), ALLEXCEPT(Table, Table[Department]) )

 

View solution in original post

az38
Community Champion
Community Champion

@Anonymous 

it is the data source name which contains measure {Data] and field column [Department]

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

Assuming the following:

- The column "Department" is in a table named Data Table (substitute for your table name obviously)

- Days is a measure: in my case I've called it [Days Measure]

 

Use this measure to calculate the average days:

Average Days by Department = AVERAGEX('Data Table'; [Days Measure])

And this measure to calculate % over year:

% Average Days / 365 = DIVIDE([Average Days by Department]; 365)

Now set up a table/matrix using the Department column to get you this:

Average of measure.JPG

 Hope this helps!

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

Assuming the following:

- The column "Department" is in a table named Data Table (substitute for your table name obviously)

- Days is a measure: in my case I've called it [Days Measure]

 

Use this measure to calculate the average days:

Average Days by Department = AVERAGEX('Data Table'; [Days Measure])

And this measure to calculate % over year:

% Average Days / 365 = DIVIDE([Average Days by Department]; 365)

Now set up a table/matrix using the Department column to get you this:

Average of measure.JPG

 Hope this helps!

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






az38
Community Champion
Community Champion

Hi @Anonymous 

ifyour dat field is a measure, it looks like you should use AVERAGEX() function https://docs.microsoft.com/en-us/dax/averagex-function-dax 

like

Average Days = CALCULATE(AVERAGEX(Table,[Days]), ALLEXCEPT(Table, Table[Department]) )

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Sorry I am a bit confused with the"Table" in the measure - could you please explain what it means?

 

Average Days = CALCULATE(AVERAGEX(Table,[Days]), ALLEXCEPT(Table, Table[Department]) )

 

az38
Community Champion
Community Champion

@Anonymous 

it is the data source name which contains measure {Data] and field column [Department]

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Users online (13,732)