cancel
Showing results for
Did you mean:
Helper IV

## How to write IF or SWITCH in MEASURE?

Hello Community,

Can anyone suggest me, how can I write below formula in MEASURE?

Final = IF (Master[Grand Request]>0,Master[Grand  Request]-RELATED('Grant Master'[Grand Total]),0)

Thanks

1 ACCEPTED SOLUTION
Super User I

Couple things,

1. determine the appropriate aggregation to be used for the base columns and create measures for them, then just reference the measures in your [Final] Measure

``````Grand_Request = sum(Master[Grand Request])
Grand_Total = sum('Grant Master'[Grand Total])

Final = IF ([Grand_Request]>0,[Grand_Request]-[Grand_Total],0)``````

Proud to be a Super User!

Super User I

Couple things,

1. determine the appropriate aggregation to be used for the base columns and create measures for them, then just reference the measures in your [Final] Measure

``````Grand_Request = sum(Master[Grand Request])
Grand_Total = sum('Grant Master'[Grand Total])

Final = IF ([Grand_Request]>0,[Grand_Request]-[Grand_Total],0)``````

Proud to be a Super User!

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.