View My Drafts
Hi there ,
I want to show the chart like below -
Last 4 weeks chart -
How to achieve this, which will exclude the current week 47 ?
My Master Calendar -
My Lastest chart is showing like below -
VAR LastWeekDay = MAX ( 'Date'[Day of Week Number] )
VAR LastYearWeekAvailable = MAX ( 'Date'[Year Week Number] )
VAR Value =
ALLEXCEPT ( 'Date', 'Date'[Day of Week Number] ),
'Date'[Day of Week Number] = LastWeekDay,
'Date'[Year Week Number] <= LastYearWeekAvailable
IF(Value, 1, 0
)I hope this helps!
Hi,I suggest to use 'rank' columns in your calendar. I have this way in all my projects and they working well.
'Rank' calculated column:
'Rank Related' calculated column:
How it works?Your current week have always rank '0'.In your report/visual you set filter on Rank Related column as 'is less than' and value 0.
It's very usefull if your customer ask for different time range on pages. eg. last 10 weeks, last 12 weeks, last 4 weeks ets. You just set filter as 'is greater than' on -10, -12 or -4Like this:I hope it helps.Regards,Adam
PS. An advice from me - Take OFF time from your Date columns. Date is date. Time is time.
Thank you!,Unfortunatelly I can't use Microsoft date logic as in my main Workspace as my customer use custom calendar (weeks, months) so all my calendar is handmade :)eg. 01/01/2021 belongs to WK 53 Year 2020 :) And 02/01/2021 it's week 01, not 02 as think MS. So calendar is fully customized.
And I agree. Rank give me flexible I need.Cheers,