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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |