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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.