Forum Discussion
Anonymous
5 years agoNot applicable
Getting some error when creating Fiscal week using custom column
Hi, I want to add fiscal week condition in my exisiting report . I am trying to do that with Custom column , but it is giving me some error. Can you please help me ? Example : I wa...
- Anonymous5 years ago
v-henryk-mstf
5 years agoCommunity Support
Hi Anonymous ,
According to the above error, it is due to the wrong syntax format used in power query, I did the following test:
if [Date] >= Date.FromText("2019-12-29") and [Date] <= Date.FromText("2020-01-04") then "Week1 2019" else if [Date] >= Date.FromText("2020-01-05") and [Date] <= Date.FromText("2020-01-11") then "Week2 2020" else "week3 2020"
Here is a related blog that can be used as a reference: Power Query IF ELSE and IF AND statements | Excel Quick Help
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.