Forum Discussion
Week number with 2 digits
- 8 years ago
Looks like I've managed to solve this myself :smileyhappy:
I used the DAX Formula " weeknumber = FORMAT(WEEKNUM([date],1),"00") "
If anyone has any other better solutions, please feel free to contribute.
Looks like I've managed to solve this myself :smileyhappy:
I used the DAX Formula " weeknumber = FORMAT(WEEKNUM([date],1),"00") "
If anyone has any other better solutions, please feel free to contribute.
- Rfranca8 years agoResolver IV
hi, afk
This is correct.
But you could do this directly in POWER QUERY, with a similar formula, removing the calculation from the tip.
Or use a CALENDAR table for this and standardize the dates of your dashboard.Please try and test using it. And please mark the right reply as answer if your issue has been resolved, otherwise, please feel free to ask if you have any other issue.
Best Regards,
Rfranca - zgiersky7 years agoFrequent Visitor
You could go with additional custom column (based on your formula):
date = FORMAT(DATE(LEFT([Year-Month],4),RIGHT([Year-Month],2),1),"yyyy-mm")
- Anonymous7 years agoNot applicable
If your week numbers are stored as whole numbers, then:
format(if(WEEKNUM([date]<10,CONCATENATE(0,WEEKNUM([date]),WEEKNUM([date]),00)
that is,
format (<value>, <format_string>) where
<value> = if(WEEKNUM([date]<10,CONCATENATE(0,WEEKNUM([date]),WEEKNUM([date])
and
<format_string> = 00
afk wrote:Looks like I've managed to solve this myself :smileyhappy:
I used the DAX Formula " weeknumber = FORMAT(WEEKNUM([date],1),"00") "
If anyone has any other better solutions, please feel free to contribute.