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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
IliasKatsis
Frequent Visitor

FIlter Dates not with Start and End date

Hello all,

I have this dataset, which refers to some TV event with a specifc start and end date! 

IliasKatsis_0-1667231033006.png

I also have an extra date table which is goal is to create date filters in my dash board. 

IliasKatsis_1-1667231114683.png

IliasKatsis_5-1667231544492.png

Now, what I want in my dashboard is a table like this, 

IliasKatsis_6-1667231610557.png

is that when i choose a @From_Date from the filter above the table, which is after the start date of the event, this events is not appeared in the table. Actually this event is active!

How these events with a From Date > Start Date can be shown in the table?
Thanks a lot !

1 ACCEPTED SOLUTION

Hi, @IliasKatsis 

This should be no different from your previous question.

You just need to keep all records that match "bucket"[creation time] < "date"[date] with the custom filter measure.

 

Best Regards,
Community Support Team _ Eason

View solution in original post

5 REPLIES 5
v-easonf-msft
Community Support
Community Support

Hi, @IliasKatsis 

You need to add a seperate calendar table without any relationship with other tables.

Then you can create a custom measure like the following 

filter = 
VAR _todate =
    MAX ( 'Calendar'[Date] )
VAR _fromdate =
    MIN ( 'Calendar'[Date] )
VAR _startdate =
    MAX ( 'Table'[Start date] )
VAR _enddate =
    MAX ( 'Table'[End date] )
RETURN
    IF (_startdate in VALUES('Calendar'[Date])|| _fromdate > _startdate, 1, 0 )

and drag this measure to your table visual filter pane to filter data.

veasonfmsft_0-1667270787423.png

Best Regards,
Community Support Team _ Eason

 

Hello again, my independent calendar date is connected with the buckets table. Why should i create a new one without connections. Thank you so much for your help!

IliasKatsis_0-1667290813357.png

 

Hi, @IliasKatsis 

It is recommended to break the relationship between 'Date'[Date] and 'table' 'Buckets'[Created at] or add a new seperate 'Date' table as slicer.

Otherwise, when you apply a filter to the Date field, 'Created at' field will also affected by the same filter.

Best Regards,
Community Support Team _ Eason

 

Ok thank you so much 
I have a last question. My table must have all the active events. This means that for example

Lets say that an event has start date 1/11 and end date 5/11. If filter dates are 30/11 until 5 the event will be shown in the table, but if i choose 2/11 is disappeared, but it is actually still active despiti its start date 
Any ideas for this ?

Hi, @IliasKatsis 

This should be no different from your previous question.

You just need to keep all records that match "bucket"[creation time] < "date"[date] with the custom filter measure.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.