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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SonaSinghA
Helper III
Helper III

Dax help for calculating average

Hi Experts ,
Need to calculate average for below dax formula
Please help.

 

Average HC = DIVIDE( [Opening HC] + [Closing HC],)

 

 BCDEFGHIJKLM
Opening HC247724982506256726902780279227822776276527532744
Closing HC249825062567269027802792278227762765275327442741
Average HC248825022537262927352786278727792771275927492743
           AVERAGE(B3:L3)AVERAGE(B3:M3)
3 REPLIES 3
Alex87
Solution Sage
Solution Sage

Hello,

I created multiple DAX measures:

 

Opening HC = 
CALCULATE(
    AVERAGE('Table'[Value]),
    'Table'[Status] = "Opening HC"
    )
Closing HC = 
CALCULATE(
    AVERAGE('Table'[Value]),
    'Table'[Status] = "Closing HC"
    )

 

I then calculated the Average measure:

 

Average HC = 
CALCULATE(
    AVERAGE('Table'[Value]),
FILTER( 'Table',
    'Table'[Status] IN {"Opening HC", "Closing HC"})
)

 

 I used a Matrix visualization and I switched values to rows.

 

  

Alex87_1-1714391606381.png

 

 

Alex87_0-1714391398410.png

If it answers your query, please mark my reply as the solution




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Hi @Alex87 ,
I want to replicate that excel formulas using below dax measures 

Closing HC =CALCULATE(COUNT('Roster'[Employee ID]))
Opening HC =Calculate([Closing HC],Parallelperiod('Calendar'[Date],-1,Month))

Average HC = DIVIDE( [Opening HC] + [Closing HC],)

Without sample data, I cannot help you much. Please provide the necessary data and détail your problem and expectations.




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




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.

Top Solution Authors