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

Calculate measure with dynamic time period

$
0
0

Hello,

at first, I have to say i'm german developer, so my english isn't the best. 
Now to my relevant question which I describe with following small situation.

I have a very simple product dimension with product_id and product_start_wid, that mark the first day of sale.
DimProduct
-----------
product_id
datekey

Of course there is an small DimDate with the known fields. 

The fact table FactTurnover have the structure:
FactTurnover
-------------
store_no
datekey
gross_profit

In words, the FactTurnover has Information about gross profit per day and store.

My target is, that the Cube provide the gross_profit per store in time granularity 1,3,7,14 day(s) after first sale per product.

Example:
store_no|product_id|gross_profit_after_1_day|gross_profit_after_3_days| ...
100 |1 |10 |40
100 |2 |20 |67
300 |2 |50 |120


Every product have an other first day of sale.

I have no beginning for this task. My knowledge in SSAS (cube building) is okay, but i haven't experience with MDX. I think a solution per MDX could be the best.

Thank for your help.






Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>