Forum Discussion
bvanderwatt
Helper III
4 years agoCategory Percentage contribution
Good Day I am trying to see the % contribution of the categories to FY22 Sales. The below formula works fine, but I want to add it to a matrix which is dependent on a date slicer. As soon as...
bvanderwatt
Helper III
4 years ago
Thank you very much.
I have incorporated your formulas. It's working perfect but only if I add the measures in two different columns.
% of Total Sold (ALLSELECTED): This is showing the % contribution of the range to the entire financial year's sales.
Category/ Range % Contribution: This is showing the % contribution of the range to the category
Ideally, I want to display it in one column.
POWER BI SNAPSHOT & FORMULAS:
% of Total Sold (ALLSELECTED) =
VAR SelectedQuantitySold =
CALCULATE(
[FY22 Nsls],
ALLSELECTED(
)
)
VAR Ratio =
DIVIDE(
[FY22 Nsls],
SelectedQuantitySold,
"0"
)
RETURN
Ratio
Category/ Range % Contribution =
VAR Cat_Current = SELECTEDVALUE( ProductList[CATEGORY] )
VAR SR_Cat =
CALCULATE( [FY22Sales],
FILTER( ALL( ProductList ) , ProductList[CATEGORY] = Cat_Current ) )
RETURN
DIVIDE(
[FY22Sales],
SR_Cat)
- AilleryO4 years ago
Memorable Member
Hi,
Not sure about expected results, but if you want to concatenate the 2 results :
NewMeasure = % of Total Sold (ALLSELECTED) & Category/ Range % Contribution
should work ? And do not forget to mark post as Solved for other members. Thanks.