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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
NJ81858
Helper IV
Helper IV

Report Builder Error

Hello,

 

I have a calculated field in Power BI Desktop that I am trying to match in Power BI Report Builder and it is working for some categories but not for others, and I'm not sure either where I am going wrong, or where I can find more information about the error.

 

This is what the column looks like in Power BI Desktop:

NJ81858_0-1687452438077.png

 

 

The calculation in question is just a weighted tax rate, multiplying the purchase amount by the tax rate and dividing by the purchase amount for each location. 

 

Here is the measure in Power BI Desktop:

Weighted Rate = 
VAR _num = CALCULATE(SUMX('Table','Teable'[Amount]*'Table'[Rate]), FILTER('Table', [Location] = [Location]))
VAR _denom = CALCULATE(SUMX('Table', 'Table'[Amount]), FILTER('Table', [Location] = [Location]))

RETURN 
DIVIDE(_num, _denom) / 100

 

Here is the expression in Report Builder:

( Sum ( ( Fields!Amount.Value *Fields!Rate.Value ) ) / Sum ( Fields!Amount.Value)) / 100

 

When I run the report this is the result:

NJ81858_1-1687452614037.png

 

 

I just am not sure why I am getting an error in some instances and not others. For the calculations that do show in Report Builder, they are correct so I am not sure how to proceed. Thank you in advance!

1 REPLY 1
d_gosbell
Super User
Super User

The DIVIDE function in DAX will check for 0 values on the denominator and will return a blank (which will then probably get filtered out) so you probably need to do the same thing in your report expressions.

 

But I would suggest just referencing the same measure in your paginated report, then you only have one place to maintain the logic.

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.