To create weeknumbers in DAX we use the DAX function WEEKNUM. The standard system it uses is the US system. To get the correct the correct weeknumber according to ISO 8601. Which is used is Europe, parts of Asia and Australia and many other countries. We now have to choose a return type. WEEKNUM('Calendar'[Date]',21) The intellisense only give 2 option for the return type. 1 (week starts sunday) 2 (Monday). How ever neither will give you the right weeknumber in Years that follow years that have 53 weeks in the ISO system. (2021 will be a year where using Type 2 will give you the wrong weeknumber every single week). Most people solve this by using an Type 21. Which is a bit of a secret. Because it is not shown as an option by the intellisense or official documentation. Can we get a ISOWEEKNUM() function just like in Excel. Which will be much easier for users to understand. Especially with 2021 coming. The first year where it would actually cause a problem since the introduction of Power BI i think it is time to make this a little bit simpler. Best regards, Jeroen
4 Comments
- Samuel_KoenigNew MemberWorking for a Global Company based out of Europe that uses this calendar, this would be GREAT addition to power BI.
- daniel_tshinNew MemberI also need this in Power Query (M), as I use a Function Query to generate my Date tables.
- nishalitNew MemberTo create weeknumbers in DAX we use the DAX function WEEKNUM. The standard system it uses is the US system. To get the correct the correct weeknumber according to ISO 8601. Which is used is Europe, parts of Asia and Australia and many other countries. We now have to choose a return type. WEEKNUM('Calendar'[Date]',21) The intellisense only give 2 option for the return type. 1 (week starts sunday) 2 (Monday). How ever neither will give you the right weeknumber in Years that follow years that have 53 weeks in the ISO system. (2021 will be a year where using Type 2 will give you the wrong weeknumber every single week). Most people solve this by using an Type 21. Which is a bit of a secret. Because it is not shown as an option by the intellisense or official documentation. Can we get a ISOWEEKNUM() function just like in Excel. Which will be much easier for users to understand. Especially with 2021 coming. The first year where it would actually cause a problem since the introduction of Power BI i think it is time to make this a little bit simpler. Best regards, Jeroen The 21 part is not an option according to the intellisense.
- fbcideas_migusrNew MemberStatus added:Needs Votes
Recent ideas
Data Pipelines - Run only selected activities
For debugging and testing pipeline activities during development, allow us to select one or multiple activities and run only the selected pipeline activities. For example, I'm working on editing ...frithjof_v19 hours agoCommunity ChampionNew618Views11likes2CommentsSemantic model connection bindings should be in source control (Git)
Semantic model data source connection bindings should be source controlled. A semantic model can contain multiple data source references, each of which can be mapped to a separate Fabric data connec...frithjof_v1 day agoCommunity ChampionNew21Views1like0CommentsBulk changing column names in Visualizations Pane
We often use raw/api column names or measures with a set nomenclature to be consistent and to keep track of them but we do not want to display these names in the visuals. Currently we have to change ...vishal1401971 day agoFrequent VisitorNew6Views0likes0Comments