| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I have built a cube that contains restaurant sales. The dimensions are Branch, Date and SaleItem. The measures (Sales Quantity, Sales Amount etc) all break down to the most granular level, except one: Covers. Covers is the number of people that ate on a certain day, at a certain branch. It is not broken down by SaleItem. If the total covers for branch #1 on 1 Jan is 100, then when the user drilled down to sales by SaleItem, you would still want to see the cover value of 100 (and not have it apportioned between the SaleItems). This data shows what I mean: Filter: Branch = Branch#1 AND DateOfSale = 1 Jan SaleItem / Covers / Sales Quantity / Participation Rate [All] 100 100 100% .... And then you drill down by SaleItem Filter: Branch = Branch#1 AND DateOfSale = 1 Jan SaleItem / Covers / Sales Quantity / Participation Rate Hotdog 100 15 15% Beer-- 100 60 60% Coffee 100 25 25% The cover count should drill down to Branch and DateOfSale, but should stay the same when you drill down into SaleItems. And then you can calculate the Participation Rate. I have done this by including 2 fact tables in the sales cube: factCovers and factSales. factSales has all 3 dimensions and all measures, except Covers. factCovers has the Branch and Date dimesions (so not the SaleItem dimension) and the Covers measure. The 2 fact tables are therefore linked with only the Branch and DateOfSale dimensions and this seems to work when I browse the cube. What I would like to find out is whether this is the correct way to deal with this. This covers example is just one example, but we have this requirement in all of our cubes and I really want to find out if I'm dealing with it in the best way. I am using SQL Server Analysis Services Standard Edition (in case that matters). |
|
#2
|
| Hi Craighb, I think that your solutions are reasonable. Regarding design best practice, I am trying to help you consult our Dev team to see if they have some good suggestions here. The process may need a little long time. I appreciate your patience! Best regards, Charles Wang Microsoft Online Community Support ================================================== ========= Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg-at-microsoft.com. ================================================== ========= Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...#notifications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== ========== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ======= |
|
#3
|
| Thanks for your help, Charles, and for asking the design team for me. Even though this design issue is important to us, it is not urgent, so I do not mind waiting for an answer. If there is anything in my question that is not clear, let me know and I'll add it to my post. |
|
#4
|
| Hi CraigHB, You can have the good result with just one fact table. You have just to create a scope on your measure in the calculation. In this scope you can force the SalesItm dimension to the (All) member. Exemple : scope([Measures].[Covers]); this = ([SalesItem].[All members]); end scope; Regards |
|
#5
|
| Thanks for the help, but please explain a little more as I'm new to MDX. I went to the Calculations tab of my cube and updated it like this: /* The CALCULATE command controls the aggregation of leaf cells in the cube. If the CALCULATE command is deleted or modified, the data within the cube is affected. You should edit this command only if you manually specify how the cube is aggregated. */ CALCULATE; scope([Measures].[Covers]); this = ([SalesItem].[All members]); end scope; But I got this error: Error 1 MdxScript(SalesCube) (10, 12) Parser: The syntax for ';' is incorrect. 0 0 Have I got the syntax wrong? Also, to use you method, how should the source data be? If there are 100 covers for Branch#1 AND DateOfSale = 1 Jan, should there 100 in the covers column repeated for every row of Branch#1 and 1 Jan? Thanks in advance |
|
#6
|
| Hi Craighb, Please remove the comma ( at the end of "end scope".By the way currently I have not been able to get any response from our product team. It may be caused by the fact that this is a design advisory question and generally we do not support on such questions. Anyway I will try to follow up them. If I still could not get a response within 2 days, it is recommended that you contact your local Microsoft Consulting Service (MCS) for the efficient solution and best results. Some issues may require a bit more in depth attention and may fall under the umbrella of Microsoft Consulting Services. For more information on MCS, please see: http://www.microsoft.com/business/se...=EN-US&gssnb=1. Please feel free to let me know if you have any other questions or concerns. Best regards, Charles Wang Microsoft Online Community Support ================================================== ======= Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg-at-microsoft.com. ================================================== ======= This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ======= |
![]() |
| Thread Tools | |
| Display Modes | |