如何避免在 QlikView 中创建日期岛?

发布于 2024-09-12 07:02:44 字数 191 浏览 0 评论 0原文

我是一名初学者开发人员,我有一个包含多个不同日期的数据库。 创建日期 转换日期 丢失的日期 更改日期 等等。

数据需要显示在一个应用程序中并过滤所有日期。我在 QlikView 中进行编码,我可以创建岛并对其进行日期处理,并使用其本机集分析来过滤数据,但这对性能产生了重大影响。

有人在 QlikView 中编码时遇到过类似的情况吗?

I'm a beginner developer and I have a database which has several different dates.
Created Date
Converted Date
Lost Date
Changed Date
etc.

The data needs to be shown in one application and filter on all dates. I am coding in QlikView and I could create and date island and use their native set analysis to use filter the data, but that is having a major impact on performance.

Anyone coding in QlikView come across a similar scenario?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼泪都笑了 2024-09-19 07:02:44

集合分析确实对性能有重大影响。您最好使用 QlikView 中的常规“选择”功能。

对于下面的答案,我假设您熟悉星型模式开发的概念。简而言之,它意味着将维度(选择字段)与事实字段(计数器字段、求和字段等)分开,并通过链接表将它们连接起来。

有两种可能的情况:

1。多个日期与同一事实相关。

例如,您有一张“销售交易”表,其中包含销售涉及的金额作为事实,并且不仅有“销售日期”,还有还有“付款日期”,您想同时选择这两个日期。在这种情况下,您希望有多个独立的日期选择,因为您无法确定用户是否想要选择转换日期、创建日期...等。您需要使用不同的键名复制“日期岛”并将其连接到你的交易表两次。两个日期池将不再是岛屿,而是更恰当地称为“日历维度”。

2.不同的日期与不同的事实相关。

在这种情况下,您可以使用一个“日历维度”来容纳所有日期字段。只需在日历中创建一个自动编号键并将其命名为 %DateKey。使该字段成为日历表和链接表之间的连接。现在,对于所有具有要通过日历选择的日期的事实表,请确保使用在自动编号哈希中包含日期的键将其连接到链接表。

Set analysis indeed has a major impact on performance. You are better off using the normal 'selection' functionality in QlikView.

For the answer below I am going to assume that you are familiar with the concept of Star Schema development. In short it means separating Dimensions (selection fields) from Fact fields (counter fields, summation fields, etc.) and connecting them via a link table.

There are two possible scenarios:

1. More than one date is related to the same fact.

For example you have a ´sales transactions´ table which has as a fact the amount of money involved in the sale, and there is not only the ´sale date´ but also the ´payment date´ and you want to select on both. In this case you want to have several independent date selections, since you cannot be sure whether the user wants to select on Converted date, Created date... etc. You need to duplicate your ´date island´ with different keynames and connect it to your transactions table twice. Both date pools will no longer be islands and are more properly called ´Calendar dimensions´.

2. Different dates are related to different facts.

In this case you can use one 'Calendar dimension' to accommodate for all date fields. Simply create one AutoNumber key in your calendar and call it %DateKey. Make this field the connection between your calendar table and your link table. Now for all Fact Tables that have a date which you want to make selectable with the calendar, make sure you connect it to the linktable using a key that includes the Date in the Autonumber hash.

天荒地未老 2024-09-19 07:02:44

如果它经历了同样的事情,我会推荐创建一个我所说的密钥表,如下例所示 Key Table;保留关系,您不必过多使用集合分析;只需确保将包含所有可能日期的表作为子表之一,并像 Littlegreen 建议的那样放置 %DateKey

Having it experienced this same what i would reccomend would be creating what i call a Key Table like the example below Key Table; keeps the relationships and you don't have to use set analysis as much; just make sure you put a table with all posible dates as one of the child tables and a %DateKey like littlegreen suggested

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文