cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Memorable Member

## How to create measure for ROI=REV/Total ?

Hi All

1 ACCEPTED SOLUTION
Community Support

Try to use the following measure for NP%:

``````NP % =
DIVIDE (
[SUM_YTD REV&COGS&EXP&OTH],
CALCULATE (
[SUM_YTD REV&COGS&EXP&OTH],
FILTER ( _PNL_Table, _PNL_Table[REV&COGS] = "REV" )
)
)``````

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

Best Regards,

Dedmon Dai

4 REPLIES 4
Community Support

Try to use the following measure for NP%:

``````NP % =
DIVIDE (
[SUM_YTD REV&COGS&EXP&OTH],
CALCULATE (
[SUM_YTD REV&COGS&EXP&OTH],
FILTER ( _PNL_Table, _PNL_Table[REV&COGS] = "REV" )
)
)``````

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

Best Regards,

Dedmon Dai

Memorable Member
Super User

Memorable Member

Thank you for sharing.

My Problem Statement :

How to compute ROI = REV/Net Profit=0.59 is correct using Amit expression below :-

RoI 1 = DIVIDE(CALCULATE([SUM_YTD REV&COGS&EXP&OTH] , FILTER(_PNL_Table,_PNL_Table[REV&COGS] = "REV")),[SUM_YTD REV&COGS&EXP&OTH])

But now i like to compute NP % = Net Profit/REV , I using below expression :-

RoI 3_ = DIVIDE(CALCULATE(

FILTER(_PNL_Table,_PNL_Table[REV&COGS] = "REV")

,

[SUM_YTD REV&COGS&EXP&OTH]

),

FILTER(_PNL_Table,_PNL_Table[REV&COGS] = "REV")

)

I get error msg :-

A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

May i know how to clear the error msg ?

My PBI file :-

Paul

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors