Hi,
I need a measure that calculates the sales per customer as a percentage of the total sales per month. I know this this is possible by Value field settings and select % of column, but then I can't use this measure in another measure.
I tried =SUM(Sales[Sales])/CALCULATE(SUM(Sales[Sales]);ALLSELECTED()), but that returns sales as a percentage of the total for all 4 months as shown below.[TABLE="width: 421"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]2012
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2012 Total
[/TD]
[/TR]
[TR]
[TD]Customer
[/TD]
[TD]May
[/TD]
[TD]June
[/TD]
[TD]July
[/TD]
[TD]August
[/TD]
[/TR]
[TR]
[TD]Customer 1
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]35 %
[/TD]
[/TR]
[TR]
[TD]Customer 2
[/TD]
[TD="align: right"]1 %
[/TD]
[TD="align: right"]0 %
[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1 %
[/TD]
[/TR]
[TR]
[TD]Customer 3
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]13 %
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]55 %
[/TD]
[/TR]
[TR]
[TD]Customer 4
[/TD]
[TD="align: right"]3 %
[/TD]
[TD="align: right"]2 %
[/TD]
[TD="align: right"]2 %
[/TD]
[TD="align: right"]3 %
[/TD]
[TD="align: right"]10 %
[/TD]
[/TR]
[TR]
[TD]Total
[/TD]
[TD="align: right"]26 %
[/TD]
[TD="align: right"]24 %
[/TD]
[TD="align: right"]25 %
[/TD]
[TD="align: right"]25 %
[/TD]
[TD="align: right"]100 %
[/TD]
[/TR]
</tbody>[/TABLE]
Any suggestions on how to solve this?
Brgds,
Caj
I need a measure that calculates the sales per customer as a percentage of the total sales per month. I know this this is possible by Value field settings and select % of column, but then I can't use this measure in another measure.
I tried =SUM(Sales[Sales])/CALCULATE(SUM(Sales[Sales]);ALLSELECTED()), but that returns sales as a percentage of the total for all 4 months as shown below.[TABLE="width: 421"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]2012
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2012 Total
[/TD]
[/TR]
[TR]
[TD]Customer
[/TD]
[TD]May
[/TD]
[TD]June
[/TD]
[TD]July
[/TD]
[TD]August
[/TD]
[/TR]
[TR]
[TD]Customer 1
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]9 %
[/TD]
[TD="align: right"]35 %
[/TD]
[/TR]
[TR]
[TD]Customer 2
[/TD]
[TD="align: right"]1 %
[/TD]
[TD="align: right"]0 %
[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1 %
[/TD]
[/TR]
[TR]
[TD]Customer 3
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]13 %
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]14 %
[/TD]
[TD="align: right"]55 %
[/TD]
[/TR]
[TR]
[TD]Customer 4
[/TD]
[TD="align: right"]3 %
[/TD]
[TD="align: right"]2 %
[/TD]
[TD="align: right"]2 %
[/TD]
[TD="align: right"]3 %
[/TD]
[TD="align: right"]10 %
[/TD]
[/TR]
[TR]
[TD]Total
[/TD]
[TD="align: right"]26 %
[/TD]
[TD="align: right"]24 %
[/TD]
[TD="align: right"]25 %
[/TD]
[TD="align: right"]25 %
[/TD]
[TD="align: right"]100 %
[/TD]
[/TR]
</tbody>[/TABLE]
Any suggestions on how to solve this?
Brgds,
Caj