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,
I am preparing a report in Power BI desktop.It has to represent the data acrosss different weeks.
Pease find the screenshot below:
As illustrated in the screenshot it is taking 2018-11 after 2018-1 instaed of 2018-2.
So can anyone help me in fixing this bug.
I have used this DAX expression for the week
Week = 'Calendar'[Year] & "-" & WEEKNUM('Calendar'[Date],2)
Solved! Go to Solution.
Hi @sajal161292,
Please create the calculated column Week using the formula below. You will get expected result as the screenshot shown.
Week = IF ( WEEKNUM ( 'Calendar'[Date], 2 ) <= 9, 'Calendar'[Year] & "-" & "0" & WEEKNUM ( 'Calendar'[Date], 2 ), 'Calendar'[Year] & "-" & WEEKNUM ( 'Calendar'[Date], 2 ) )
Best Regards,
Angelia
It's not a bug per se, it's sorting it correctly based on it being a text field you're creating. If you're happy with a week displaying as 2018-01, look to add an if statement into your expression to concatenate in a 0 if your week number is less than 9
Hi,
Can you help me with its DAX expression ?
Thanks
Hi @sajal161292,
Please create the calculated column Week using the formula below. You will get expected result as the screenshot shown.
Week = IF ( WEEKNUM ( 'Calendar'[Date], 2 ) <= 9, 'Calendar'[Year] & "-" & "0" & WEEKNUM ( 'Calendar'[Date], 2 ), 'Calendar'[Year] & "-" & WEEKNUM ( 'Calendar'[Date], 2 ) )
Best Regards,
Angelia
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |