Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Simple Measure to always show current weeks data

Hi All,

 

I'm new to PBI and I've not been able to find the answer I want. It seems fairly straightforward but everything seems to be a variation of.

 

I would just like to create a 100% stacked visual, that filters on whatever the current week number is. I believe I can use a measure to create this filter?

 

I have created a calendar table in Excel that uses ISOWEEKNUM to generate the week number. My table looks like this:

Capture.PNG

 

Thanks in advance for your help!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try code as below to create a new calculated column and filter on True.

Current Year Week =
YEAR ( [Date] ) * 100
    + WEEKNUM ( [Date], 2 )
    = YEAR ( TODAY () ) * 100
        + WEEKNUM ( TODAY (), 2 )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Ah actually not quite, it returns the week number for all years, not just current year.

Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try code as below to create a new calculated column and filter on True.

Current Year Week =
YEAR ( [Date] ) * 100
    + WEEKNUM ( [Date], 2 )
    = YEAR ( TODAY () ) * 100
        + WEEKNUM ( TODAY (), 2 )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

I think I have found the solution I was after. I created a new column on my Date Table and used:

 

Current Week = WEEKNUM([Date],2) = WEEKNUM(TODAY(),2)

 

 

 

Which returned a TRUE/FALSE value. I can now filter on True.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.