Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hi everyone,
I want to create a measure to calculate the calendar weeks. The table looks like this:
| year | month | date |
| 2020 | January | 1 |
| 2021 | March | 18 |
| 2019 | July | 6 |
| 2021 | September | 22 |
I tried to aggregate the data first and then use weeknum, but it did not work.
Thank you in advance,
Solved! Go to Solution.
@Anonymous - I tried to generate the solution using DAX.
Step 1: Create Calcualting Column like this:
@Anonymous - I tried to generate the solution using DAX.
Step 1: Create Calcualting Column like this:
@Anonymous I would recommend adding a true date column in Power Query and then WEEKNUM will work:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMlDSUfJKzCtNLKoEsgyVYnXAwoZAjm9iUXIGSNACKmpoCVJcmgNSaYasMji1oCQ1Nym1CMg2MlKKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [year = _t, month = _t, date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"year", type text}, {"month", type text}, {"date", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [month] & " " & [date] & ", " & [year]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type date}})
in
#"Changed Type1"
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!