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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Show data before the selected period in relative date slicer

Hello,


I have data from ADS about workitems, comments and descriptions.
Using Invoked custom functions, i have created two tables:
table1 which contains  workitem_id, workitem_title comments_createddate
table 2 which containt workitem_id, workitem_title, description_created date

I have to display the workitems_tilte whose comments_createddate is not within the date range used as filter. 
The created_date is as a relative date slicer. example Last 1 month
I have created the measure selected date that displays the minimun date of the slicer.

selected date =
var sele = minx(ALLSELECTED('WorkItems ID'),'WorkItems ID'[Get WorkItems.comments.createdDate])
return
sele

asinaj_0-1674566574291.png

In a table I want to display the workitems_title whose comments_createddate is before the date in the slicer. 

3 REPLIES 3
Anonymous
Not applicable

Hi @amitchandak 
I created a relationship between DateTbale and FactTable, but the measure to display data before the selectd period is not working. 
I have workitems with different comments.createddate sot for example if i filter the DateTable last 1 week 19.01-25.01. I want to display all workitems whose comments date is before 19.01 

Anonymous
Not applicable

@amitchandak 
I already have a Date Table but the date table is related with workitems table.
Workitems table is then related with my table1. 
The filter is not working

amitchandak
Super User
Super User

@Anonymous , Create a common date table and join it with both tables

 

new measure =
var _max = maxx(allselected(Date),Date[Date])
return
calculate( sum(Table[Value]), filter(all('Date'), 'Date'[Date] <=_max))

 

or

 

new measure =
var _max = Minx(allselected(Date),Date[Date])
return
calculate( sum(Table[Value]), filter(all('Date'), 'Date'[Date] <=_max))

 

 

In case you need trend the slicer needs to be on an independent table 

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors