简体   繁体   English

SSAS:如何设计我的多维数据集

[英]SSAS: How to design my cube

I'm quite new to SSAS and have problem designing a cube. 我对SSAS还是很陌生,在设计多维数据集时遇到问题。

  • table 1: closed tickets with: ticket_id, user_id, date, processing_time 表1:已关闭的票证,包含:票证ID,用户ID,日期,处理时间
  • table 2: user data: user_id, login, first_name, last_name 表2:用户数据:user_id,登录名,名字,姓氏
  • table 3: user groups: group_id, group_name 表3:用户组:group_id,group_name
  • table 4: period of user belong to a group: user_id, group_id, assigned_date, left_date 表4:用户所属的时间段所属的组:user_id,group_id,assigned_date,left_date
    I also added a time table 我还添加了时间表

How do I design the cube to get the amount of tickets a user has closed while he was a member of a specified group? 我如何设计多维数据集以获取用户在指定组中时已关闭的门票数量? I have no clue how to tell SSAS to select the group when the selected date is between assigned_date and left_date. 我不知道如何在所选日期介于Assigned_date和left_date之间的情况下告诉SSAS选择该组。

You need to denormalize the data to allow this to be handled intuitively. 您需要对数据进行规范化处理,以使其能够直观地进行处理。

I would handle this in a transformation when populating your TicketsMEasure in either your datawarehouse or SSAS cube. 当在数据仓库或SSAS多维数据集中填充TicketsMEasure时,我将通过转换来处理。 Joining tickets with users with group members ship, using ticket.closeddatetime between group start/end as criteria. 使用组开始/结束之间的ticket.closeddatetime作为条件,可以将与具有组成员的用户的票合并在一起。 This will denormalize your tickets such that you can now have the group ID that the user was a member of when the ticket was closed 这将使您的票证不规范化,以便您现在可以拥有关闭票证时用户所属的组ID。

ClosedTicketsMeasure
TicketId, UserId, GroupId, DateKey

Now you can easily slice/dice on Groups/Users/Months/Weeks to get counts of the number of tickets closed in those combinations. 现在,您可以轻松地对组/用户/月/周进行切片/切块,以获取这些组合中关闭的票数的计数。

Using MSFT's SSAS with SSDT, you must follow the steps below: 将MSFT的SSAS与SSDT一起使用,必须遵循以下步骤:

  • Create a connection to the database, you can do it by using the intelligent wizard when pressing right click at fist folder on solution explorer of your project. 创建与数据库的连接,您可以通过在项目的解决方案资源管理器上的fist文件夹上按鼠标右键单击时使用智能向导来进行连接。
  • Create a database model that connects your data, you can do it by using the intelligent wizard when pressing right click at second folder on solution explorer of your project, here select your connection manager that you built in previous step and the tables that you will use. 创建一个连接数据的数据库模型,在项目的解决方案资源管理器上的第二个文件夹上按鼠标右键时,可以使用智能向导来执行此操作,在这里选择上一步中构建的连接管理器以及将要使用的表。
  • Create a cube, you can do it by using the intelligent wizard when pressing right click at third folder on solution explorer of your project, here select that model you built in previous step and the measures you want to use. 创建一个多维数据集,您可以通过在项目的解决方案资源管理器上的第三个文件夹上单击鼠标右键时使用智能向导来执行此操作,在这里选择您在上一步中构建的模型以及要使用的度量。

After you do there's steps and make the necessary hierarchies and partitioning for efficiency improvement then you can deploy your cube on your server by pressing the start button and use the browser of SSDT using drag and drop objects like dimensions and measures to built your report. 完成步骤并进行必要的层次结构和分区以提高效率后,您可以通过按开始按钮将多维数据集部署在服务器上,并使用SSDT的浏览器,通过拖放对象(如尺寸和度量)来构建报表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM