vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I am a newbie and I have been studying DW for a while and I've successfully built some cubes. There is still one thing I am not sure how to design it in the fact table which is the COUNT. Let's say I have an Order Fact to record the order from customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some sales related measurments. How do I count how many orders were cancelled (I stored -1 as a value) for CancelDate? Should I add an measurment column that put a value of 1 if the order was cancelled and put 0 if the order was not cancelled so that it can be aggregated in the cube? I need the same thing to count the pickup since some customers pick up in the store not ship out and I need to be able to generate the comparison between ShipOut, Pickup, and Cancel. Thanks so much Ed |
| |||
| Hi Ed, I think that you can add either add a column to your fact table or not. The reason is that if you do not want to add it to your fact table, you can create a view that combines your fact table and an additional column for cancel status in your data warehouse. After that you can use it as the fact table in your cube. This should be easily implemented in T-SQL statement. You can also applies this method to your other requirements on ShipOut, Pickup and Cancel. If you use ROLAP, the query performance may be slower than putting them into one fact table. If you use MOLAP, the performance impact can be ignored. Hope this helps. Please feel free to let me know if you have any other questions or concerns. Have a nice day! 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@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. ================================================== ======= "Ed" <Ed@discussions.microsoft.com> wrote in message news:7071268F-7A66-43E7-BBBC-7EBAC96073A3@microsoft.com... > Hi, > I am a newbie and I have been studying DW for a while and I've > successfully built some cubes. > There is still one thing I am not sure how to design it in the fact table > which is the COUNT. Let's say I have an Order Fact to record the order > from > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and > some > sales related measurments. How do I count how many orders were cancelled > (I > stored -1 as a value) for CancelDate? Should I add an measurment column > that > put a value of 1 if the order was cancelled and put 0 if the order was not > cancelled so that it can be aggregated in the cube? I need the same thing > to > count the pickup since some customers pick up in the store not ship out > and I > need to be able to generate the comparison between ShipOut, Pickup, and > Cancel. > > Thanks so much > > Ed > |
| |||
| Thanks. This is a very good suggestion and I learn one more thing from you about I can create a view as a fact table so that I can use some case statement in SQL to put the value of 1 or 0. The Kim Ball group books that I have read so far, they just said it is always MOLAP. I don't think creating view would be an issue. I am still wondering if I don't create columns in the fact table to hold 1 or 0 for cancel date / ship out date, etc, can I still count / distinct count how many orders were cancelled at different level after building the cube? I guess the answer would be "Yes" but what is the way to it? Thanks again. Ed "Charles Wang [MSFT]" wrote: > Hi Ed, > I think that you can add either add a column to your fact table or not. The > reason is that if you do not want to add it to your fact table, you can > create a view that combines your fact table and an additional column for > cancel status in your data warehouse. After that you can use it as the fact > table in your cube. This should be easily implemented in T-SQL statement. > You can also applies this method to your other requirements on ShipOut, > Pickup and Cancel. If you use ROLAP, the query performance may be slower > than putting them into one fact table. If you use MOLAP, the performance > impact can be ignored. > > Hope this helps. Please feel free to let me know if you have any other > questions or concerns. > > Have a nice day! > > 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@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. > ================================================== ======= > "Ed" <Ed@discussions.microsoft.com> wrote in message > news:7071268F-7A66-43E7-BBBC-7EBAC96073A3@microsoft.com... > > Hi, > > I am a newbie and I have been studying DW for a while and I've > > successfully built some cubes. > > There is still one thing I am not sure how to design it in the fact table > > which is the COUNT. Let's say I have an Order Fact to record the order > > from > > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and > > some > > sales related measurments. How do I count how many orders were cancelled > > (I > > stored -1 as a value) for CancelDate? Should I add an measurment column > > that > > put a value of 1 if the order was cancelled and put 0 if the order was not > > cancelled so that it can be aggregated in the cube? I need the same thing > > to > > count the pickup since some customers pick up in the store not ship out > > and I > > need to be able to generate the comparison between ShipOut, Pickup, and > > Cancel. > > > > Thanks so much > > > > Ed > > > > |
| |||
| Hi Ed, Yes, you can do it. As I had said that if you do not create columns in the fact table to hold 1 or 0, you can create a view for including the columns that hold 1 or 0. However in either way, adding such values is necessary since you need additive values for counting in OLAP analysis. Hope this helps. Please feel free to let me know if you have any other questions or concerns. Have a nice day! 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@microsoft.com. ================================================== ======= This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ======= |
| |||
| Hi, Why are not going to create dimension called Order Type with to members Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all orders and filter them if you would like to show only canceled and you do not need to use -1 as a value. "Ed" wrote: > Hi, > I am a newbie and I have been studying DW for a while and I've > successfully built some cubes. > There is still one thing I am not sure how to design it in the fact table > which is the COUNT. Let's say I have an Order Fact to record the order from > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some > sales related measurments. How do I count how many orders were cancelled (I > stored -1 as a value) for CancelDate? Should I add an measurment column that > put a value of 1 if the order was cancelled and put 0 if the order was not > cancelled so that it can be aggregated in the cube? I need the same thing to > count the pickup since some customers pick up in the store not ship out and I > need to be able to generate the comparison between ShipOut, Pickup, and > Cancel. > > Thanks so much > > Ed > |
| |||
| that would work too but 1 order could have 3 records. OrderDate, ShipoutDate/PickupDate or CancelledDate. On the other side, the fact table needs to be updated for different date if it is not at the Order Type level. What would be a better way? "Tomasz Borawski" wrote: > Hi, > > Why are not going to create dimension called Order Type with to members > Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all > orders and filter them if you would like to show only canceled and you do not > need to use -1 as a value. > > "Ed" wrote: > > > Hi, > > I am a newbie and I have been studying DW for a while and I've > > successfully built some cubes. > > There is still one thing I am not sure how to design it in the fact table > > which is the COUNT. Let's say I have an Order Fact to record the order from > > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some > > sales related measurments. How do I count how many orders were cancelled (I > > stored -1 as a value) for CancelDate? Should I add an measurment column that > > put a value of 1 if the order was cancelled and put 0 if the order was not > > cancelled so that it can be aggregated in the cube? I need the same thing to > > count the pickup since some customers pick up in the store not ship out and I > > need to be able to generate the comparison between ShipOut, Pickup, and > > Cancel. > > > > Thanks so much > > > > Ed > > |
| ||||
| I think you need to decide what is important for you: - Searching for single events (ordering, shipping etc) - just current status (the most common scenario) - Searching for multiple events - intresiting idea, but is it really required? "Ed" wrote: > that would work too but 1 order could have 3 records. > OrderDate, ShipoutDate/PickupDate or CancelledDate. > > On the other side, the fact table needs to be updated for different date if > it is not at the Order Type level. > > What would be a better way? > > "Tomasz Borawski" wrote: > > > Hi, > > > > Why are not going to create dimension called Order Type with to members > > Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all > > orders and filter them if you would like to show only canceled and you do not > > need to use -1 as a value. > > > > "Ed" wrote: > > > > > Hi, > > > I am a newbie and I have been studying DW for a while and I've > > > successfully built some cubes. > > > There is still one thing I am not sure how to design it in the fact table > > > which is the COUNT. Let's say I have an Order Fact to record the order from > > > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some > > > sales related measurments. How do I count how many orders were cancelled (I > > > stored -1 as a value) for CancelDate? Should I add an measurment column that > > > put a value of 1 if the order was cancelled and put 0 if the order was not > > > cancelled so that it can be aggregated in the cube? I need the same thing to > > > count the pickup since some customers pick up in the store not ship out and I > > > need to be able to generate the comparison between ShipOut, Pickup, and > > > Cancel. > > > > > > Thanks so much > > > > > > Ed > > > |