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.
Hello Team,
Can you please assist me how to convert weeks i.e W53 12 2020 to "Dec-2020", tried using Format its not working, data type from source is "TEXT"
Thank you
Regards,
Solved! Go to Solution.
@harirao , You can create a date as a
Week to Date = var _st = date(right([Weeks],4),1,1)
var _week = mid([Weeks],2,2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1
From the date you can get any format
Year of the month to format([Week to Date] ,"MMM YYYY")
@harirao ,
In a new column like
if(SEARCH("W53",[Weeks],,0)>0, "Dec " & right([Weeks],4),[Weeks])
Hi @amitchandak,
Thanks for your quick response, it is working for one row, is it possible to use month mentioned in row Eg "W53 12 2020", can use only 12, 11, 10 for converting month format?
Thanks for your help
Regards,
@harirao , You can create a date as a
Week to Date = var _st = date(right([Weeks],4),1,1)
var _week = mid([Weeks],2,2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1
From the date you can get any format
Year of the month to format([Week to Date] ,"MMM YYYY")
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 |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |