Fabio Lima
New Member
- Joined
- Jul 19, 2012
- Messages
- 3
Guys,
this has been making me insane for the last few days, can anyone give me hand. I need the % of a grand total for every row in my pivot table. HOWEVER I need calculate a few things before that. Bear with! The example below gives me the total volume of a product by two months broken down by region and cluster. I need to divide each cell in a column by its column grand total, and then subtract the result of "this month" by "last month", and that must be in only one DAX measure.
[TABLE="class: outer_border, width: 350, align: left"]
<tbody>[TR]
[TD]Region & Cluster[/TD]
[TD]Last Month[/TD]
[TD]This Month[/TD]
[/TR]
[TR]
[TD]Region A[/TD]
[TD]152[/TD]
[TD]151[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]126[/TD]
[TD]124[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]26[/TD]
[TD]27[/TD]
[/TR]
[TR]
[TD]Region B[/TD]
[TD]182[/TD]
[TD]186[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]84[/TD]
[TD]92[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]98[/TD]
[TD]94[/TD]
[/TR]
[TR]
[TD]Region C[/TD]
[TD]44[/TD]
[TD]55[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]21[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]23[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD]378[/TD]
[TD]392[/TD]
[/TR]
</tbody>[/TABLE]
Help me guys!
Cheers!
this has been making me insane for the last few days, can anyone give me hand. I need the % of a grand total for every row in my pivot table. HOWEVER I need calculate a few things before that. Bear with! The example below gives me the total volume of a product by two months broken down by region and cluster. I need to divide each cell in a column by its column grand total, and then subtract the result of "this month" by "last month", and that must be in only one DAX measure.
[TABLE="class: outer_border, width: 350, align: left"]
<tbody>[TR]
[TD]Region & Cluster[/TD]
[TD]Last Month[/TD]
[TD]This Month[/TD]
[/TR]
[TR]
[TD]Region A[/TD]
[TD]152[/TD]
[TD]151[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]126[/TD]
[TD]124[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]26[/TD]
[TD]27[/TD]
[/TR]
[TR]
[TD]Region B[/TD]
[TD]182[/TD]
[TD]186[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]84[/TD]
[TD]92[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]98[/TD]
[TD]94[/TD]
[/TR]
[TR]
[TD]Region C[/TD]
[TD]44[/TD]
[TD]55[/TD]
[/TR]
[TR]
[TD]cluster 1[/TD]
[TD]21[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]cluster 2[/TD]
[TD]23[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD]378[/TD]
[TD]392[/TD]
[/TR]
</tbody>[/TABLE]
Help me guys!
Cheers!