Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a report that is not totaling 2 columns correctly, the code i am using is below. Any suggestions?
| Work Scope | EST QTY | QTY Complete | % Complete | Cost to Date | Est Cost to Completion | Est Total Cost | Revenue | Estimated Gross Margin | |
| 1 | 130 | 111 | 85.4% | 60,702.82 | 10,390.57 | 71,093.39 | 120,822.66 | 41.2% | |
| 2 | 456 | 216 | 47.4% | 9,474.32 | 10,527.02 | 20,001.34 | |||
| 3 | 135 | 58 | 43.0% | 24,755.19 | 32,864.65 | 57,619.84 | 61,456.52 | 6.2% | |
| 4 | 277 | 99 | 35.7% | 20,674.43 | 37,172.21 | 57,846.64 | 105,459.03 | 45.1% | |
| 5 | 66729 | 128,264.08 | 100.0% | ||||||
| 6 | 666 | 15,861.37 | 100.0% | ||||||
| 7 | 2 | - | |||||||
| 8 | 5 | 26,163.52 | 100.0% | ||||||
| Total | 998 | 484 | 48.5% | 115,606.76 | 90,954.45 | 206,561.21 | 458,027.18 | 54.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])) |
Solved! Go to Solution.
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.
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 49 | |
| 44 |