Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Solved! Go to Solution.
Hi @YuliyaMusiyuk ,
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.
Hi @YuliyaMusiyuk ,
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.
could you pls provide some sample data? I am confused about your description and screenshot.
Proud to be a Super User!