Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

Allocate monthly target to day

$
0
0

Hi,

I have a fact table and a product dim with a hierarchy 3 levels: Productcategory --> ProductLine --> Product

Our planing team will release a monthly target for every product, i.e.

 

ProductCodeProductTargetmonthyear
1A23412016
1A23822016
1A24232016
1A25442016
1A28952016
2B102212016
2B104822016
2B112232016
2B124842016
2B134252016

 

 

So now i need to create some reports that show comparision between actual vs target daily, i tried to import the monthly target of each product for everyday : for example, product A- i inserted a new date column :

ProductCodeProductTargetmonthyeardate
1A234120161/1/2016
1A234120161/2/2016
1A234120161/3/2016
1A234120161/4/2016
1A234120161/5/2016
1A234120161/6/2016
1A234120161/7/2016
1A234120161/8/2016
1A234120161/9/2016
1A234120161/10/2016
1A234120161/11/2016
1A234120161/12/2016
1A234120161/13/2016
1A234120161/14/2016
1A234120161/15/2016
1A234120161/16/2016
1A234120161/17/2016
1A234120161/18/2016
1A234120161/19/2016
1A234120161/20/2016
1A234120161/21/2016
1A234120161/22/2016
1A234120161/23/2016
1A234120161/24/2016
1A234120161/25/2016
1A234120161/26/2016
1A234120161/27/2016
1A234120161/28/2016
1A234120161/29/2016
1A234120161/30/2016
1A234120161/31/2016


and use MAX fuction in DAX : Acctualvs.Target = SUM(Quantity)/Avg(Target). However, when i show only Product in report then the result was correct but when i show Product hierarchy with ProductCategory||ProductLine|| Product in report, the result was incorrectly because the avg function was not sum total product target for each Productline and Sum total Productline target for Product Category!. 

Please give me some advice to resolve this issue, it is very important in all my report! daily actual vs monthly target.

Thanks & best regards,
J.


Viewing all articles
Browse latest Browse all 216047

Trending Articles



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