Suppose I had the following table in a SQL Server DB I wanted to do an Excel PowerPivot (Excel 2010 version) on:
Date: Grp: Value:
1-Jan a 1
1-Jan a 2
1-Jan b 3
1-Jan c 4
2-Jan a 5
2-Jan b 6
2-Jan a 7
2-Jan b 8
2-Jan c 9
And the way it works is that I need to, for lack of better wording, double-pivot it.
What I need to do is:
- Return
Sum(Value)
ByDate
andGrp
Output:
Date: Grp: Value:
1-Jan a 3
1-Jan b 3
1-Jan c 4
2-Jan a 12
2-Jan b 14
2-Jan c 9
THEN, I need to, say, perform another computation (other than sum()
) on this data - For the product of values for each day to get:
Output2:
Grp: Value:
a 36
b 42
c 36
So, I know how to use PowerPivot to get the first set of results and I'm guessing I could create a calculated field with many repeated values for each group value to right away calculate Output2
, but I'm wondering if there's a way to maybe output the first output and then use that resulting pivot table as an input into PowerPivot.
Overall, I'm a PowerPivot newbie, so any advice about how to do this would be really appreciated!!
Thanks!!