Skip to main content

Power BI

Needs Votes

Add Week over Week calculation in Time Intelligence Measures?

Vote (331) Share
's profile image

on 26 Sep 2018 13:05:09

As of now I see Month on Month and Year on year calculations but at times we also need Week over Week calculation in Time Intelligence Measures? I think it will be a great value add for people who work on Weekly reports.

Comments (22)
's profile image Profile Picture

276e69a9 8e0d-4460-a6ad-3a62d71a649e on 05 Jul 2020 23:01:08

RE: Add Week over Week calculation in Time Intelligence Measures?

When will this be developed and rolled out?

's profile image Profile Picture

d6ae553d 3227-42f1-ab71-1afc67351099 on 05 Jul 2020 23:00:29

RE: Add Week over Week calculation in Time Intelligence Measures?

Absolutely indispensible !

's profile image Profile Picture

d6ae553d 3227-42f1-ab71-1afc67351099 on 05 Jul 2020 23:00:29

RE: Add Week over Week calculation in Time Intelligence Measures?

This is a workaround until this is implemented :
https://gist.github.com/r-k-b/18d898e5eed786c9240e3804b167a5ca

's profile image Profile Picture

eef8c59a 8d8c-4216-b164-e390f603466a on 05 Jul 2020 22:55:08

RE: Add Week over Week calculation in Time Intelligence Measures?

You can use a calendar table linked to your Date column

's profile image Profile Picture

1f1a04dc f379-4966-9517-597ce65b1afb on 05 Jul 2020 22:47:30

RE: Add Week over Week calculation in Time Intelligence Measures?

It just cost me quite some time to see that the M-function in Query-Editor, which is generated by
Add Column - Date - Week - Week of Year
really behanved different from the function "WEEKNUM".
It really is solved quite satisfactory in Excel.
It should REALLY by introduced into M, so that I can append tables with WEEK-comlumns efficiently in query designer.

's profile image Profile Picture

a215aaaf 71b0-4a14-b1fa-559ea7e0e3c2 on 05 Jul 2020 22:46:09

RE: Add Week over Week calculation in Time Intelligence Measures?

DAX function DATESINPERIOD should add support for weeks in addition to the current periods defined. Or ideally, it should support a custom period entered as an integer (so I could do hourly, bi-weekly, whatever I feel like).

's profile image Profile Picture

82542e1e 9ae0-44e9-980d-90be9d7a769f on 05 Jul 2020 22:30:06

RE: Add Week over Week calculation in Time Intelligence Measures?

My company not only reports on monthly numbers, but also weekly. Thus it would be nice to have time intelligence functions like Previousmonth, but for weekly periods, so that WoW calculations are much easier to create etc.

's profile image Profile Picture

276e69a9 8e0d-4460-a6ad-3a62d71a649e on 05 Jul 2020 22:27:42

RE: Add Week over Week calculation in Time Intelligence Measures?

That doesn't seem to fix the problem:

Expression error: The name 'weeknum' wasn't recognized. Make sure it's spelled correctly.

input given: =weeknum(date,21)

's profile image Profile Picture

943b37f3 a65e-4fb8-899a-457bb29b6001 on 05 Jul 2020 22:26:10

RE: Add Week over Week calculation in Time Intelligence Measures?

Dear Jeffrey, unfortunatelly DAX function like M functions both returns incorrect week number, it's not ISO number

's profile image Profile Picture

95a04cf8 04fb-4dca-b295-48f8931e6b85 on 05 Jul 2020 22:22:10

RE: Add Week over Week calculation in Time Intelligence Measures?

Thank you very much for your suggestion, Jeffrey.
However, it would be much better to be able to reference a Power Query table cell for other interim evaluations and calculations... before loading all the needed structures in DAX and without writing kilometers of code only to obtain this result.