Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone
I'm trying to create a calendar where the smallest unit is the week, but that still uses dates in the background.
all works fine until I add the month and year column, then I start to get double entries.
Does anyone know how to make Powerbi calculate the week number based on the last day of the week (Sunday of that week in my case) so that if a week overlaps two months, only one entry will apear corresponding to the latter month?
Here is the query:
I actually got the desired outcome by creating a calendar table in powerquery, filtering only the sundays (the last day of the week in my case), then adding the required columns in DAX. What I got was a calendar with the weeknumbers as the lowest granularity level, but without the repeating values.
You are looking for WEEKDAY function (DAX) - DAX | Microsoft Learn
My advice would be to compute this outside of Power BI, in a static reference table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |