cancel
Showing results for
Did you mean:
Regular Visitor

## % Of revenue per outlet

Hello,

i am trying to calculate % of revenue per outlet; see below - i need each Cat-Category to be devided by Total rev in that Cat-DepartmentDesc

1 ACCEPTED SOLUTION
Community Support

Please try the following formula :

``````div by rev =
VAR _rev =
CALCULATE ( SUM ( 'Table'[REV] ), ALLEXCEPT ( 'Table', 'Table'[Cat-Depart] ) )
VAR _mtd =
CALCULATE (
SUM ( 'Table'[CY MTD] ),
FILTER (
'Table',
'Table'[Cat-Depart] = MAX ( 'Table'[Cat-Depart] )
&& 'Table'[Cat-Category] = MAX ( 'Table'[Cat-Category] )
)
)
RETURN
DIVIDE ( _mtd, _rev )
``````

Then format the measure as 2 decimal places. The final output is shown below:

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

2 REPLIES 2
Community Support

Please try the following formula :

``````div by rev =
VAR _rev =
CALCULATE ( SUM ( 'Table'[REV] ), ALLEXCEPT ( 'Table', 'Table'[Cat-Depart] ) )
VAR _mtd =
CALCULATE (
SUM ( 'Table'[CY MTD] ),
FILTER (
'Table',
'Table'[Cat-Depart] = MAX ( 'Table'[Cat-Depart] )
&& 'Table'[Cat-Category] = MAX ( 'Table'[Cat-Category] )
)
)
RETURN
DIVIDE ( _mtd, _rev )
``````

Then format the measure as 2 decimal places. The final output is shown below:

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

Super User

could you pls provide some sample data?  I am confused about your description and screenshot.

Proud to be a Super User!

Announcements