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
Milozebre,
How do you create the measure? Could you please share sample data of your table? And create the following columns in your table and check which formula returns correct result.
WeekNumber = WEEKNUM(Table[A.D_CLOTTECH],1)
WeekNumber = WEEKNUM(Table[A.D_CLOTTECH],2)
Regards,
Lydia
- Milozebre8 years agoHelper V
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
- Anonymous8 years agoNot applicable
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 ?