Create a Power BI measure to sum a column where another column meets a requirement

Viewed 19

I'm new to DAX and I'm trying to do something that would be really simple in Excel!

Using data from the same table, I'm trying to add a measure, that calculates my 'TargetCost' column where the 'NameUnit' is '1111'.

if nameunit = 1111 then sum the target cost

In excel the formula would be:

=sumif(nameunit,"1111",targetcost)

How do I write this into a measure in DAX please?

1 Answers
Related