I apologize in advance if I did not word the title correctly. Basically I'm trying to group by the attempts on a phone number and pivot on those attempts and summing the call duration.
In T-sql i currently group the records into attempts as such:
year | month | call_attempts | call_duration |
2012 | 1 | 1 | 14 |
2012 | 2 | 1 | 28 |
2012 | 2 | 3 | 14 |
2012 | 1 | 5 | 45 |
2012 | 1 | 1 | 22 |
2012 | 3 | 2 | 9 |
2012 | 2 | 6 | 135 |
I then pivot the results out by attempt and summing the duration:
year | month | 1 | 2 | 3 | 4 | 5 | 6 |
2012 | 1 | 3243774 | 1974793 | 1227519 | 768413 | 431929 | 244010 |
2012 | 2 | 2400985 | 1022634 | 735852 | 487300 | 234704 | 131903 |
2012 | 3 | 1098756 | 146423 | 27442 | 6909 | 1256 | 132 |
Can something like this be done simply in SSAS and if so does anyone know how to go about doing it? Currently the Date is a dimension and the call duration is a measure. The phone number is in the fact table but currently unused and I'm not sure how i would go about using it in this case to get what I'm looking for.