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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
_Regina
Helper I
Helper I

DAX Measure for Average per Branch

_Average new accounts per Branch MTD =
var n= [New Accounts - MTD]   
var d = CALCULATE(DISTINCTCOUNT('Account LifeCycle'[BRANCH_DIM_SYSID]),FILTER('Account LifeCycle',[New Accounts - MTD]  >=1))
Return (n/d)

Hi Everyone,
I am trying to create a measure for new accounts per branch Month to date. I have a measure '[New Accounts - MTD]  ' which I am storing in var n.
For the denominator I am trying to capture the number of branches that have atleast one new account.  But the denominator (var d) is counting all the branches, the ones with no data as well. Hence giving me wrong average per branch.
I am unable to understand what I am doing wrong here.
 
I would appreciate any guidance here.

1 REPLY 1
wdx223_Daniel
Super User
Super User

_Average new accounts per Branch MTD =
var n[New Accounts - MTD]   
var d = CALCULATE(DISTINCTCOUNT('Account LifeCycle'[BRANCH_DIM_SYSID]),FILTER(ALL('Account LifeCycle'[BRANCH_DIM_SYSID]),[New Accounts - MTD]  >=1))
Return (n/d)

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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