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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I was wondering, in one of my calcul for the current week I put: Semaine_en_cours = WEEKNUM(TODAY())
So since 2018, I have all the current weeks auto calculated.
For today, the formula includes the 31/12/2018 as the "53rd" week . But 2018 ends at the "52" (see bellow)
So How may I get my " Semaine en cours : 1 " on the board ?
Any solutions /advice / tips ?
Thanks by advance,
Also there is another parameter for the weeknum function where you specify whether a week starts on Sunday or on Monday.
Hi @ThomasBP
try this measure instead of your formula
you could replace "DATE( )" with today( )
Measure 2 = var week1=WEEKNUM(DATE(2018,12,31),2) return IF(week1>52,1,week1)
Best Regards
Maggie
Hi @ThomasBP
if you want the slicer to change as you said,
please create calculated columns in your date table
slicer-weeknum = IF([calendar_weeknum]>52,1,[calendar_weeknum]) slicer-year = IF([calendar_weeknum]>52,[calendar_year]+1,[calendar_year])
Best regards
Maggie
Well, the issue is that there really are 53 weeks in 2018. But, if it bugs you, you can always do this:
Semaine_en_cours = VAR __weeknum1 = WEEKNUM(TODAY()) RETURN IF(__weeknum1 > 52,52,__weeknum1)
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!