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
Anonymous
Not applicable

Simple DAX calculation

I made a DAX of the following Formula but i verified the formula using excel there is a quite a bit of difference in the results that I have obtained. Yellow Colored column is from Power BI using DAX and Grey is in excel using the formula below, but somehow the implementation is not working in DAX. 

 

What I am doing wrong or how to correct this error. Seems like a very simple problem?

 

Total Revenue = (T.CHARGES + T.XCHARGES) * T.FUNCTIONAL_AMT / T.TOTAL_CHARGES

 

DAX 

Total Revenue = (SUM('1.Orders (fact)'[CHARGES])+SUM('1.Orders (fact)'[XCHARGES]))* DIVIDE(SUM('1.Orders (fact)'[FUNCTIONAL_AMT]),SUM('1.Orders (fact)'[TOTAL_CHARGES]))
 
The Excel Workbook export
talal_007_0-1678143926604.png

=+IFERROR((E5+F5)*D5/E5,0)

 

 

 

The total I get in the power BI is also hugely  different i get a total of 1,111,016 in POWER BI when I export the data into Excel it shows only 53,000. What am I doing wrong?

talal_007_0-1678145002993.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

try leave out all the SUM, like:

Total Revenue = 
(('1.Orders (fact)'[CHARGES])+
('1.Orders (fact)'[XCHARGES]))* 
DIVIDE(
    ('1.Orders (fact)'[FUNCTIONAL_AMT]),
    ('1.Orders (fact)'[TOTAL_CHARGES])
)

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @Anonymous 

try leave out all the SUM, like:

Total Revenue = 
(('1.Orders (fact)'[CHARGES])+
('1.Orders (fact)'[XCHARGES]))* 
DIVIDE(
    ('1.Orders (fact)'[FUNCTIONAL_AMT]),
    ('1.Orders (fact)'[TOTAL_CHARGES])
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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