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
Surveys
Regular Visitor

DAX alternate value is not aggregating total

I have created the below matrix table. One of the measures created (LISA BG/AG Ratio) was returning blank values due to the measure being unable to divide by 0. I changed the DAX to provide an alternate value of 0. It seems that the alternate values are not aggregating with the other values in the column to provide an accurate Total amount (should be 0.8 not 2.3). I imagine this requires a little more advanced DAX than I have used. DAX syntax:

 

LISA BG/AG Ratio =
DIVIDE(
    SUM('FormCPEEndOfDay'[LISABelowGroundLeaks]),
    SUM('FormCPEEndOfDay'[LISAAboveGroundLeaks]),0
)

 

Any help is appreciated.

 

Surveys_0-1602594983465.png

 

1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

Hi @Surveys  - can you explain further why you expect the "Total" row to show 0.8 instead of 2.3?  Your formula is BG/AG, which on the Total row is 25/11 = 2.3

 

PowerBI/DAX doesn't sum up the way Excel pivot tables do - measures are calculated in the context of the total data set - so it is acting correctly based on information you have given so far.

 

Hope this helps

David

View solution in original post

2 REPLIES 2
dedelman_clng
Community Champion
Community Champion

Hi @Surveys  - can you explain further why you expect the "Total" row to show 0.8 instead of 2.3?  Your formula is BG/AG, which on the Total row is 25/11 = 2.3

 

PowerBI/DAX doesn't sum up the way Excel pivot tables do - measures are calculated in the context of the total data set - so it is acting correctly based on information you have given so far.

 

Hope this helps

David

I was looking at it the wrong way. Thanks.

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!

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.