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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rpinxt
Power Participant
Power Participant

Make the graph show current week and previous 3 full weeks

So what we want to see is 4 columns with the corresponding weeks.

But when I set a relative date like :

rpinxt_0-1727966048358.png

You see it takes also 6th of September but this leads to:

rpinxt_1-1727966087986.png

5 weeks in which week 36 is only 1 day. That will confuse people so we do not want that.

 

Then I was thinking calendar weeks :

rpinxt_2-1727966144004.png

But then we get no days in October and its october 3rd now.

rpinxt_3-1727966182037.png

 

So now I have 4 weeks but not the current week 40.

 

Does somebody know how you can get the current week and the 3 previous full calendar weeks??

 

 

1 ACCEPTED SOLUTION
rpinxt
Power Participant
Power Participant

Well I now did it with this filter :

WeekFilter =
VAR MaxWeek = CALCULATE(MAX(dimDate[Week Nr (ISO)]),REMOVEFILTERS(dimDate[Week Nr (ISO)]))
RETURN
IF(SELECTEDVALUE(dimDate[Week Nr (ISO)]) >= MaxWeek - 3,1,0)
 
Seems to work fine.
But maybe there are better and more elegant solutions?

View solution in original post

2 REPLIES 2
v-tianyich-msft
Community Support
Community Support

Hi @rpinxt ,

 

This is great, thanks for sharing!

 

Best regards,
Community Support Team_ Scott Chang

rpinxt
Power Participant
Power Participant

Well I now did it with this filter :

WeekFilter =
VAR MaxWeek = CALCULATE(MAX(dimDate[Week Nr (ISO)]),REMOVEFILTERS(dimDate[Week Nr (ISO)]))
RETURN
IF(SELECTEDVALUE(dimDate[Week Nr (ISO)]) >= MaxWeek - 3,1,0)
 
Seems to work fine.
But maybe there are better and more elegant solutions?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.