Forum Discussion
Week Number is INCORRECT
- 8 years ago
Hello Lydia,
Sorry for the delay.
I found the solution.
here is the line in my query for the weeknumber :
,datepart(ww,A.D_CLOTTECH) AS WEEK_CLOTTECH
I look in internet and i found some solution and the easyer is change something in my query : change ww to ISO_WEEK
,datepart(ISO_WEEK,A.D_CLOTTECH) AS WEEK_CLOTTECH
Now, its working :)
Thank you
Good Morning Lydia,
I dont create a measure for to get a weeknumber.
its defined in the SQL query.
Here is a view of the result.
Thnak you
Milozebre,
Do you mean that you get different weeknumber after you import the table to Power BI Desktop by writing SQL query? If so, I am unable to reproduce the issue. Please share me the DDL and DML of your table so that I can test.
Regards,
Lydia
- Milozebre8 years agoHelper V
Hi Lydia,
thank you for your answers.
Yes, when I run the query, I get several fields then when I use visualization I see that difference.
I dont know how to give you DDL and DML, sorry.
The database is very big, I can you the export of the query in excel, if you want ?
- Anonymous8 years agoNot applicable
Milozebre,
Please share me the exported excel file and explain that what fields you use to create the visual.
Regards,
Lydia- Milozebre8 years agoHelper V
Hello Lydia,
Sorry for the delay.
I found the solution.
here is the line in my query for the weeknumber :
,datepart(ww,A.D_CLOTTECH) AS WEEK_CLOTTECH
I look in internet and i found some solution and the easyer is change something in my query : change ww to ISO_WEEK
,datepart(ISO_WEEK,A.D_CLOTTECH) AS WEEK_CLOTTECH
Now, its working :)
Thank you