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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
praeepmaharathi
Frequent Visitor

How to calculate child amount sum when actual amout is null on some field

How to calculate child amount sum when actual amout is null on some field. can you please help to provide the dax formula.

Managed - Combined(null Actual)= sum of managed actual value

 

Unmanaged - Combined(null Actual)=sum of unmanaged actual value

 

Data for reference

CountryU/MTypeTargetActuals
IndiaManagedManaged - Combined $1
IndiaManagedManaged - Individual$1$5
IndiaManagedManaged - Individual$3$3
IndiaManagedManaged - Individual$5$4
IndiaManagedManaged - Individual$4$2
IndiaManagedManaged - Individual$3$1
IndiaManagedManaged - Individual$2$1
IndiaManagedManaged - Individual$15
IndiaManagedManaged - Individual$21
IndiaManagedManaged - Individual$31
IndiaManagedManaged - Individual$42
IndiaUnmanagedUnmanaged $2
IndiaUnmanagedUnmanaged $1
IndiaManaged - Combined $5 
IndiaUnmanaged - Combined $1 
1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @praeepmaharathi 

you can try this, create the measure,

Measure = 
    var _UM=MIN('Table'[U/M])
    var _mTotal=CALCULATE(SUM('Table'[Actuals]),FILTER(ALL('Table'),'Table'[U/M]="Managed"))
    var _uTotal=CALCULATE(SUM('Table'[Actuals]),FILTER(ALL('Table'),'Table'[U/M]="Unmanaged"))
return SWITCH(TRUE(),
_UM="Managed - Combined",_mTotal,
_UM="Unmanaged - Combined",_uTotal,
MIN('Table'[Actuals])
)

vxiaotang_0-1639036252661.png

 

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @praeepmaharathi 

you can try this, create the measure,

Measure = 
    var _UM=MIN('Table'[U/M])
    var _mTotal=CALCULATE(SUM('Table'[Actuals]),FILTER(ALL('Table'),'Table'[U/M]="Managed"))
    var _uTotal=CALCULATE(SUM('Table'[Actuals]),FILTER(ALL('Table'),'Table'[U/M]="Unmanaged"))
return SWITCH(TRUE(),
_UM="Managed - Combined",_mTotal,
_UM="Unmanaged - Combined",_uTotal,
MIN('Table'[Actuals])
)

vxiaotang_0-1639036252661.png

 

 

Best Regards,

Community Support Team _Tang

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

SudeepDuvvuru
New Member

Consider it as data quality issue. In power query replace nulls with zeroes.

Hi,

I am dealing with null only condition, when actual is null and U/M column value is Managed -Combined then it will populate (sum of managed actual value). Any Dax formula for this to calculate child value and paste that value to null field

Example: Managed - Combined Actual null value should be $26 (Manage value)

               Unmanged -Combined Actual null value should be $3 (unmanaged 2+1)

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.