Forum Discussion
JonathanK1999
3 years agoFrequent Visitor
Dividing all rows by a calculated value
I have created an income statement, and want to divide every single row by the total sales row in a table that looks something like this: Category Sum of Total DESIRED ANSWER Sales $1,...
amitchandak
Super User
3 years agoJonathanK1999 , try like
% total sales = DIVIDE(CALCULATE(SUM(ConsolidadoPG[Sum of Total])), CALCULATE(SUM(ConsolidadoPG[Sum of Total]), ConsolidadoPG[Categoria]="Sales"))
or
% total sales = DIVIDE(CALCULATE(SUM(ConsolidadoPG[Sum of Total])), CALCULATE(SUM(ConsolidadoPG[Sum of Total]), Filter( all(ConsolidadoPG) , ConsolidadoPG[Categoria]="Sales")) )
or
% total sales = DIVIDE(CALCULATE(SUM(ConsolidadoPG[Sum of Total])), CALCULATE(SUM(ConsolidadoPG[Sum of Total]), Filter( allselected(ConsolidadoPG) , ConsolidadoPG[Categoria]="Sales")) )
- JonathanK19993 years agoFrequent Visitor
Did not work, I am not getting the desired answer, and its just filtering for the values that fall under the sales sub category, such as food, clothing, beverages and tickets in the example above.