Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a date table with a week year column like this:
Solved! Go to Solution.
Hi @sw123 ,
Try this:-
Column =
VAR week_num =
1+ INT (
DIVIDE (
(
[Date] - WEEKDAY ( [Date], 16 ) + 1
)
- ( DATE ( YEAR ( [Date] ), 1, 1 ) ),
7
)
)
RETURN
"Week year " & YEAR ( [Date] ) & " " & week_num
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @sw123 ,
Try this:-
Column =
VAR week_num =
1+ INT (
DIVIDE (
(
[Date] - WEEKDAY ( [Date], 16 ) + 1
)
- ( DATE ( YEAR ( [Date] ), 1, 1 ) ),
7
)
)
RETURN
"Week year " & YEAR ( [Date] ) & " " & week_num
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi, @sw123
Try this calendar dax script (you need to play with the iso parameters also):
https://www.dropbox.com/s/qo20q59mbsz60av/Custom%20Calendar%20%28ISO%2C%20445%2C%20etc%29.txt?dl=0
or this can be also helpful:
https://blog.gbrueckl.at/2012/04/iso-8601-week-in-dax/
Proud to be a Super User!
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |