Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Need help for a Challenging aggregation

$
0
0

Let me first tell the scenario;

Main Measure is the HOURLY PRODUCTION AMOUNT ([Measures].[Production]) of various factories. Dimensions are Dim_Factory, Dim_Date, Dim_Hour. SUM aggregation was sufficient until now. But from now on there will be a PEAK_Production and PEAK_Production_Contrubution (per factory) analysis. 

PEAK_Production = the Production data of the HOUR where the MAX Production has been made. (Sum within Factories and after that MAX within HOURS give me data = How?) Retrieving the Max data is not enough i will also need to display the relevant HOUR and DATE next to it.

ex of some analysis:

| JULY 2012 | AUGUST 2012 | SEPT. 2012 |
Factory_1 | 05 July 2012 | 14:00 | 14000 | 15 August 2012 | 18:00 | 15000 | 01 Sept 2012 | 11:00 | 20000 |
Factory_2 | 15 July 2012 | 16:00 | 15000 | 25 August 2012 | 16:00 | 17000 | 11 Sept 2012 | 21:00 | 12000 |

| JULY 2012 | AUGUST 2012 | SEPT. 2012 |
All Factories | 10 July 2012 | 16:00 | 25000 | 09 August 2012 | 16:00 | 30000 | 11 Sept 2012 | 15:00 | 28000 |

| 2012 Q.3 |
Factory_1 | 01 Sept 2012 | 11:00 | 20000 |
Factory_2 | 25 August 2012 | 16:00 | 17000 |

| 2012 Q.3 |
All Factories | 09 August 2012 | 16:00 | 30000 |

as u can see the combined production times of factories can -and generally will- be different.

Another analytic measure; PEAK_Production_Contrubution is The Hourly production of a Factory when the Combined PEAK_Production occurs. for ex lets say when JULY 2012's peak occured in 10th of July with 25000 tons at 16:00, Fatory1's 16:00 production value is its PEAK_Production_Contrubution in this time frame.

So this data analysis is strictly dependent on time dimension, and i don't know how to re-construct this cube? Maybe i will be better with T-SQL and views but this is an hourly data and it will get extremely large.

Any suggestions will be appreciated. Thanks in advance.


! LiVe By ThE cOdE, DiE bY tHe CoDe !




Viewing all articles
Browse latest Browse all 2472

Trending Articles