Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Can we make Last vs This week measure without Date function?

Hi,

 

I have 'Week' column and it is from 'Week from File Name' which is from Left function(e.g. file name: W10_ABC.xlsx).

So 'Week' column value is not actually from Date related dax calculations. 

*sometimes files updated late so I didn't use Week number or Date related function just to align with file name.

 

I wanna make last week measure to compare last vs current week. 

But there are 2 obstacles:

 

1. Week Number or Date related function wouldn't work because the files sometimes updated late.

 

e.g. if current week is W13 and file of W12 uploaded this week(uploader forgot and upload late) then this one should be sorted as W12 although it's been actually uploaded at W13. 

If we use Date function then it would be sorted as current calendar week as W13 rather than W12. 

 

2. 'Week' column will be filtered by slicer so if we use Filter/All function then last week value couldn't be shown. 

 

 

So what I want is:

To filter by 'Week' column value:

 

If I select W12 then W12 data show as this week and W11 data still show as last week.

If I select W10 then W10 data show as this week and W09 data still show as last week.

*Accordingly 'vs Last Week' measure calculations should be aligned. 

 

I've tried Max, Selectedvalues, Rank, etc but still struggling. 

 

Please help! 

 

2 Replies