Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
658 views
in Technique[技术] by (71.8m points)

timestamp - 在PowerBI(桌面)中,如何对每天(或每周或每月)的时间戳分组?(In PowerBI (Desktop), how to group timestamp per day (or week or month)?)

On PowerBI (Desktop), I am working with a file containing multiple rows and 2 columns.

(在PowerBI(桌面)上,我正在处理包含多行和2列的文件。)

Timestamp |

(时间戳记|)

Value

(值)

29/08/2018 04:45 |

(29/08/2018 04:45 |)

105

(105)

29/08/2018 05:00 |

(29/08/2018 05:00 |)

111

(111)

29/08/2018 05:15 |

(29/08/2018 05:15 |)

112

(112)

29/08/2018 05:30 |

(29/08/2018 05:30 |)

111

(111)

29/08/2018 05:45 |

(29/08/2018 05:45 |)

113

(113)

29/08/2018 06:00 |

(29/08/2018 06:00 |)

115

(115)

29/08/2018 06:15 |

(29/08/2018 06:15 |)

111

(111)

29/08/2018 06:30 |

(29/08/2018 06:30 |)

104

(104)

I want to build a new table by grouping all the rows related to the same day and compute the average of the related values.

(我想通过对与同一天相关的所有行进行分组来构建一个新表,并计算相关值的平均值。)

I am quite new on PowerBI and didn't manage to find how to do this.

(我在PowerBI上还很陌生,没有设法找到方法。)

I tried to group the rows by creating a new column like this:

(我试图通过创建像这样的新列来对行进行分组:)

Day = FORMAT([Timestamp],"dd.mm.yyyy")

but the content of this new column remains the same of Timestamp.

(但是此新列的内容与“时间戳记”相同。)

Could someone help me please?

(有人可以帮我吗?)

  ask by Fred. Chen. translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It would probably be best to split your Timestamp column in the Query Editor into a date column and a time column before trying to do anything else.

(在尝试执行其他任何操作之前,最好将“查询编辑器”中的“ Timestamp列拆分为日期列和时间列。)

Home > Split Column by Delimiter > Split by a Space

(Home>按定界符分隔列>按空格分隔)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...