Forum Discussion

Yrstruly2021's avatar
Yrstruly2021
Helper V
2 years ago

SUM/SUMIF Function In DAX

Please assist. Am i using the correct function in dax for SUM/SUMIF equilvalents in Dax, Also when do i use Calculate?

My Totals are inflated, my conversions from Excel to DAX, might not be correct.

Measure: Depreciation and amortisation in Excel(see Excel link for Formula), DAX:

WorkingCapitalMvtsInclProvisions = 
[Other asset movements] 
+ [Working capital - budget flex]
+ CALCULATE(
    SUM('ZTBR'[Amount in USD]),
    'ZTBR'[Roll_Up_Function] = "Provision movements"
)<p>Formula in Excel: <li-code lang="markup">=-SUMIF(Details!B:B;'Cash Flow'!G39;Details!G:G)

 

 

AND Disposals & impairment of fixed assets.

DAX: 

 

Disposals & impairment of fixed assets = 
CALCULATE(
    SUM('ZTBR'[Amount in USD]),
    'ZTBR'[Roll_Up_Function] IN {
        "Profit on disposal of pooling equipment",
        "Scrapped pooling equipment",
        "Impairment or valuation adjustment of pooling equipment",
        "Disposals or valuation adjustments of other fixed assets"
    }
)

 

 

Excel Formula: 

 

=SUM(K21:K24)

 

 

 

 

 

 

 

PBIX: https://drive.google.com/file/d/1-wHE0e50nSM9-wSq4dTxStDX58APO_MI/view?usp=sharing  

Excel: https://docs.google.com/spreadsheets/d/1ubo9TAz2zzCpKbfO5SFBMjFLgjFtUxhY/edit?usp=sharing&ouid=104129043494164133703&rtpof=true&sd=true 

3 Replies