Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to do Weeks in the Month

$
0
0

Dear all,

 

I have data e.g. Dealer, Car, Month, Amount.

My single record data looks like this 12345, HOLDEN, 201308, 50

 

I need to dynamically work out the weeks in the month, e.g. 5 weeks for August 1013, to end up with this.

 

12345, HOLDEN, 201308, 10

12345, HOLDEN, 201308, 10

12345, HOLDEN, 201308, 10

12345, HOLDEN, 201308, 10

12345, HOLDEN, 201308, 10

 

So I need to spread the months KPI over the weeks within the month.

 

Unfortunately the M_TIME_DIMENSION does not have this measure. SAP, would be nice if you could include this.

 

I think it may be done with some smart calculated and restricted measures

 

Any SQL gurus that can help me write a view over the M_TIME_DIMENSION, that I can use in a join, too.

 

thanks in advanced

g


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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