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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
paulj1
Helper II
Helper II

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
 
 

 

99.JPG

 

Can I use SELECTEDVALUE in anyway ?

 

 Any Ideas, thanks in advance....

 

Paul

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@paulj1 ,

 

You may drag [Date] from a calendar table.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors