Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

If Empty/0 MAX Sum of one of two columns

So I have a column in a matrix that is kicking my tail and I'm trying to make a calculated column to resolve this. 

It's a column that if no values for that Category in the table are present it turns up blank and that is causing problems in the report. 

Each column represents a table of transactions in the dataset. 

The problem child is the "Cost to Complete" column. If there are adjustments out side of the estimate to a particular category, transaction totals are populated in Cost to Complete and the remaining budget is based on those adjustments.
However if no adjustments are made, the cost to complete column should reflect the higher of the Revised Estimate or the Actual costs.


I've tried the below formula but it always is coming up False and using the Cost to Complete. 

= IF(isblank(CALCULATE(SUM(Cost To Complete))),MAX(CALCULATE(SUM(Actual Costs)),CALCULATE(SUM(REvised Estimate))),CALCULATE(SUM(Cost to Complete)))


It would also seem my Max statement is not doing it's job correctly either as I reversed the true/false formulas and I'm getting a totally off the wall value. 

Looking for some guidance. 

Frequent Visitor

Just if anyone is interested, I was able to achieve my goal. 

Cost At Complete =
VAR CostToComplete = SELECTEDVALUE('Cost to Complete'[Cost to Complete],CALCULATE(SUM('Cost to Complete'[Cost to Complete])))
VAR ActualCosts = SELECTEDVALUE(Costs[Actual Costs],CALCULATE(SUM('Costs'[Actual Costs])))
VAR RevisedEstimate = SELECTEDVALUE('Revised Estimate'[Revised Estimate],CALCULATE(SUM('Revised Estimate'[Revised Estimate])))
Except for now I'm having issues with the totals not working correctly. UGH

Helpful resources


2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors