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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SCNCKS1
Helper I
Helper I

Total line is not adding totals,

I have a report that is not totaling 2 columns correctly, the code i am using is below. Any suggestions? 

Work ScopeEST QTYQTY Complete% CompleteCost to DateEst Cost to CompletionEst Total CostRevenueEstimated Gross Margin 
113011185.4%     60,702.82                       10,390.57                        71,093.39     120,822.6641.2% 
245621647.4%       9,474.32                       10,527.02                        20,001.34   
31355843.0%     24,755.19                       32,864.65                        57,619.84        61,456.526.2% 
42779935.7%     20,674.43                       37,172.21                        57,846.64     105,459.0345.1% 
566729          128,264.08100.0% 
6666             15,861.37100.0% 
72                             -    
85             26,163.52100.0% 
Total99848448.5%  115,606.76                       90,954.45                      206,561.21     458,027.1854.9% 
          
   Showing in powerbi                    122,772.47                      238,379.23 48.0% 
          
    Difference                       31,818.02                        31,818.02   
          
          
          
          
LS_EST_COST_COMPLETE = CALCULATE(        
     Sum(TBL_Production[TOTAL cost])/([da prod total]/[Est Qty]) - Sum(TBL_Production[TOTAL cost]),    
     TREATAS(VALUES(TBL_Production[ProjectID]), TBL_EST_FT_PRODUCTION[Project_ID]),    
     TREATAS(VALUES(TBL_EST_FT_PRODUCTION[Project_ID]), TBL_Hour_Tracking[ProjectID]),    
      TREATAS(VALUES(TBL_Production[ProductionUnitID]),TBL_EST_FT_PRODUCTION[Production_Unit_ID]),    
       TREATAS(VALUES(TBL_Production[ProjectID]),TBL_EST_FT_PRODUCTION[Project_ID]))    
1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @SCNCKS1 ,

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @SCNCKS1 ,

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors