微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 PowerBI DAX 以秒为单位查找重叠的扫描日期

如何解决使用 PowerBI DAX 以秒为单位查找重叠的扫描日期

我希望根据扫描的开始和完成日期查找重叠扫描,这些扫描可以在几秒钟内完成。

我的表结构:

ApplicationID
ScanId
ReleaseId
StartedDate
CompletedDate

我正在寻找在同一 ApplicationID 上与另一个 ScanID 重叠的 StartedDate 和 CompletedDate 的所有 ScanId

表格数据:

ApplicationID | ScanID | ReleaseID  |  StartedDate           | CompletedDate
 129              150      291          2021-03-15 09:10:03  | 2021-03-15 09:34:08
 128              157      293          2021-03-15 09:12:05  | 2021-03-15 09:27:06
 128              157      294          2021-03-15 09:14:06  | 2021-03-15 09:14:10

场景是:

Overlapping Scan within another scan
 (B.Starteddate GREATER THAN A.StartedDate 
    and 
  B.Completeddate LES THAN A.CompletedDate)
 
  A------------------------------A
       B------------------B

Overlapping Scan Starts before another scan and ends before the other scan
  (B.stareddated LESS THAN A.starteddate AND B.CompletedDate GREATER THAN A.StartedDate)

        A-------------------------A
    B-----------------B

Overlapping Scan Ends after after another scan and ends after the other scan
  (B.Starteddate between A.starteddate and A.completeddate
   AND
   B.CompletedDate GREATER THAN A.CompletedDate)

        A-----------------------A
                B----------------------B


Scan starts and ends within Overlapping Scan start and end
   (A.StartedDate GREATER THAN B.StartedDate
    AND
   A.CompletedDate LESS THAN B.CompletedDate)

            A--------------A
     B-------------------------------B

请注意,有些扫描需要几秒钟。

任何帮助将不胜感激

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。