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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Quinn_921
New Member

DAX IF Statement not calculating correctly

I have a table with a number of measures - one of them as displayed below checks Project Labor budgets and if they are blank assigns a "0" value, if they're non blank the expression calculates.

 

Labor Invoiced + Billable Non Invocied + Billable Fixed Fee = IF([Project Labor Budget]=0,BLANK(),InvoiceTransactions[Transaction Gross Amount]+InvoiceTransactions[Transaction Write-Off Amount]
+CALCULATE(SUM(Transactions[FixedFeeRevenue]),Transactions[Is Transaction Invoiced]="Not Invoiced",Transactions[Is Transaction Billable]="Billable")
+CALCULATE(SUM(Transactions[LaborRevenue]),Transactions[Is Transaction Invoiced]="Not Invoiced",Transactions[Is Transaction Billable]="Billable"))

I use this measure to derive the total backlog remaining in my umage below - However in my table the total values are calulating as if I hadn't used that IF Statement.

 

Table Values

 

Can anyone shed some light on what i'm doing wrong here?

2 REPLIES 2
Anonymous
Not applicable

Hi @Quinn_921,

 

Can you please share some sample to test? It will be help to clarify your situation.

In addition, you can also try to use below formula if it works on your side.

Calculate column formula:

 

Labor Invoiced + Billable Non Invocied + Billable Fixed Fee =
IF (
    [Project Labor Budget] = 0,
    BLANK (),
    InvoiceTransactions[Transaction Gross Amount]
        + InvoiceTransactions[Transaction Write-Off Amount]
        + SUMX (
            FILTER (
                ALL ( Transactions ),
                Transactions[Is Transaction Invoiced] = "Not Invoiced"
                    && Transactions[Is Transaction Billable] = "Billable"
            ),
            [FixedFeeRevenue] + [LaborRevenue]
        )
)

 

 

BTW, 'Project Labor Budget' is a measure who host on other table, right?

 

Regards,

Xiaoxin Sheng

Zubair_Muhammad
Community Champion
Community Champion

@Quinn_921

 

Is this a MEASURE?

 

Could you try this

 

Labor Invoiced + Billable Non Invocied + Billable Fixed Fee =
IF (
    SELECTEDVALUE ( [Project Labor Budget] ) = 0,
    BLANK (),
    SELECTEDVALUE ( InvoiceTransactions[Transaction Gross Amount] )
        + SELECTEDVALUE ( InvoiceTransactions[Transaction Write-Off Amount] )
        + CALCULATE (
            SUM ( Transactions[FixedFeeRevenue] ),
            Transactions[Is Transaction Invoiced] = "Not Invoiced",
            Transactions[Is Transaction Billable] = "Billable"
        )
        + CALCULATE (
            SUM ( Transactions[LaborRevenue] ),
            Transactions[Is Transaction Invoiced] = "Not Invoiced",
            Transactions[Is Transaction Billable] = "Billable"
        )
)

 

 

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.