Forum Discussion

paulj1's avatar
paulj1
Helper II
7 years ago

Relative date Filtering.... and measures....

So i Have a model with a dates table, so i drop a relative date filter in, ask to show me the last 6 weeks, as you can see below, says that is 23/01/2019 to 05/03/2019 which is ok.

 

I in effect need to extract the "6" to use as a denominator in a DIVIDE function to get a weekly volume for that period,so, i create a measure of

 

# Weeks = DATEDIFF(Min(Dates[Date]), MAx(Dates[Date]),DAY)/7
 
but that returns 5 ?????
 
So I create two measures
Max Date = calculate(max(Dates[Date])) returns 27/02/19 - WHY ????
Min Date = calculate(MIN(Dates[Date])) returns 23/01/19
 
 

 

 

Can I use SELECTEDVALUE in anyway ?

 

 Any Ideas, thanks in advance....

 

Paul

 

 

2 Replies

    • paulj1's avatar
      paulj1
      Helper II

      Sorry i dont understand, i drag the date field to create the relative slicer in the first place.