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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Stuartw1988
New Member

Relative Dates

Hi,

 

I am using filters to establish list of customers who have certain last order dates.  I have used relative date feature to get customers who have orders in last 30 days - but how can I use this for customers between (for example) 31-90 days?

 

I'm currently manually inputting last order date each time I refresh the model, which is useable given I have a small number of cohorts, but not ideal.

 

Thanks,

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Stuartw1988 

You can try this method

(1) create the table below, use it in slicer

vxiaotang_0-1654504345420.png

vxiaotang_2-1654504368946.png

(2) create the measure, use it to filter table

filter = IF(MIN('FactTable'[Start Date])<=SlicerDays[SlicerDate1] && MIN('FactTable'[Start Date])>=[SlicerDate2],1,0)

you can put it in visual level filter,

vxiaotang_3-1654504475329.png

For more please check the sample file attached below.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Stuartw1988 

You can try this method

(1) create the table below, use it in slicer

vxiaotang_0-1654504345420.png

vxiaotang_2-1654504368946.png

(2) create the measure, use it to filter table

filter = IF(MIN('FactTable'[Start Date])<=SlicerDays[SlicerDate1] && MIN('FactTable'[Start Date])>=[SlicerDate2],1,0)

you can put it in visual level filter,

vxiaotang_3-1654504475329.png

For more please check the sample file attached below.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Stuartw1988

 

Rolling 31-90 =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today()) -31
var _min = _max -90
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))

 

 

or

 

Rolling 31- 90 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ])-31,-60,DAY))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.