You can simply write a few measures in DAX to do the calculations in Power BI (which is exactly the power of Power BI).
Have a look in the sample given here:
Revenue =
CALCULATE(
SUM('Fact'[Amount]),
FILTER(
'Fact',
'Fact'[Amount] > 0
)
)
Preparing for Power BI exam? Check out Power BI Syllabus now!