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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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!




Anonymous
Not applicable

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors