如何像calendar()一样生成小时?

问题描述 投票:0回答:1

我想每两个小时生成一个模型,并对每一行进行计算,就像calendar()一样。 我的模型中已经有 calendar() 来生成一些日子。如何在 DAX 中将日期与一组时间连接起来? 很喜欢:

4/27/2024 0:00
4/27/2024 2:00
4/27/2024 4:00
......

4/28/2024 0:00
4/28/2024 2:00
4/28/2024 4:00
...

4/29/2024 0:00
...
.......
dax powerbi-desktop
1个回答
0
投票

我意识到我可以在 M 中做到这一点。所有问题都已解决

let
    Source = List.Dates(#date(1901, 1, 1), 54405, #duration(1,0,0,0)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
in
    #"Converted to Table"
© www.soinside.com 2019 - 2024. All rights reserved.