January 10, 2018 at 3:52 am
Hi Friends,
Last week I got a interesting task which is projecting some sales.
My task is to find out the missing sales for the previous week in FACT_Sales table. Lets say that we have some sales in between Dec/31/2017 to Jan/06/2018. Some times we miss sales for a day or two because of delay in getting the input files from users.
For example, Let's say that we have not got any sales on Tuesday, so I would project some sales in to a new table Fact_Sales_Project for Tuesday.
In view, I use Union ALL to merge the actual sales along with the projectred with a field called IsProjected to distinguishing actual sales vs projected sales.
Select *, 'No' AS IsProjected From Fact_Sales
UNION ALL
Select *, 'Yes' AS IsProjected From Fact_Sales_Project
The end user wants to see this in the cube. When they report sales data, by default it should show actual sales in the report. Since this is coming from the FACT, it is going into a measure in the cube which I think will not serve the purpose. Is there any way to achieve this?
Please give me your suggestions. Let me know in case if more details required.
Thanks,
Charmer
January 10, 2018 at 6:52 pm
Charmer - Wednesday, January 10, 2018 3:52 AMHi Friends,Last week I got a interesting task which is projecting some sales.
My task is to find out the missing sales for the previous week in FACT_Sales table. Lets say that we have some sales in between Dec/31/2017 to Jan/06/2018. Some times we miss sales for a day or two because of delay in getting the input files from users.
For example, Let's say that we have not got any sales on Tuesday, so I would project some sales in to a new table Fact_Sales_Project for Tuesday.In view, I use Union ALL to merge the actual sales along with the projectred with a field called IsProjected to distinguishing actual sales vs projected sales.
Select *, 'No' AS IsProjected From Fact_Sales
UNION ALL
Select *, 'Yes' AS IsProjected From Fact_Sales_ProjectThe end user wants to see this in the cube. When they report sales data, by default it should show actual sales in the report. Since this is coming from the FACT, it is going into a measure in the cube which I think will not serve the purpose. Is there any way to achieve this?
Please give me your suggestions. Let me know in case if more details required.
No problem. Just grab the preceeding and proceeding row for each range of blank row(s), take the average of those two rows and distribute that number to the blank rows.
If you want more than just a helpful suggestion, then you know what you need to do. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply