过滤器问题 [英] Problems with filters

查看:96
本文介绍了过滤器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

简而言之,我正在尝试使用SQL SERVER 2012工具开发BI应用程序。

一切顺利。

我描述了我的问题:

BI应用程序是为一家工业公司开发的。这项工作是在3个部分时间(上午,下午,晚上)。

表格日期中的日期是整数(对于EXP'2015-07-22'将是20,150,722)出于性能原因(正在加载数据...)

此外,小时数将在enteger中转换(例如:id = 1返回时间:0h-1h,谁在夜间发布)。



==>早上06h到14h

==>下午14h到22h

==>晚上从22h到06h



问题是如何在夜间帖子中计算出这样的度量。

答案很明确:SUM of两个日期,第一个从22h到00h

,第二个从01h到06h。但是如何???????

在SSAS中,你不能过滤两次。

我需要帮助。

谢谢你

Hello ,
In short, I am trying to develop a BI application using the tool SQL SERVER 2012 .
The everything went well and properly.
I described my problem:
The BI application is developed for an industrial company . The work is on 3 Part times ( Morning , Afternoon , Night ) .
The dates in the table "Date" are integers (for EXP ' 2015-07-22 ' will be 20,150,722 ) for performance reasons ( Loading data ... )
Also the hours are converted in enteger ( for example : id = 1 returns to time : 0h-1h , who is on Night post) .

==> Morning 06h to 14h
==> Afternoon 14hh to 22h
==> Night from 22h to 06h

The problem is how to calculate such a measure in the Night post.
The answer is clear : SUM of two dates, the first from 22h to 00h
and the second from 01h to 06 h . but how ???????
In SSAS , you can not filter twice.
Please I need help.
Thank You

推荐答案

我真的建议放弃使用整数而不是datetime的想法。这种逻辑将使操作和查询数据变得非常困难。



性能如何,SQL Server在内部使用数字处理日期,因此整数和日期不应该有意义。
I really suggest dropping the idea of using integers instead of datetime. That kind of logic will make it very difficult to manipulate and query the data.

What comes to performance, SQL Server handles dates internally using numbers so the difference between integer and date shouldn't be meaningful.


这篇关于过滤器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆