Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Retrieving Data based on two dates in one table

Hi, 

Good day.

I have a table with two dates (activated date and reactivated date) and the requirement is to retrieve the data based on that two dates using only 1 calendar.

Here's the sample table structure and the current active connection to the calendar table is created_date.

If my Date slicer value is from 10/01/2021 to 10/31/2021 then I should still retrieve Zoro's information because he's reactivated_date is within the range. 

ref_idapp_idnameemailcreated_datereactivated_date
1222Luffy[email protected]10/01/202110/20/2021
1111Zoro[email protected]10/02/202010/25/2021
2333Sanji[email protected]10/05/2021null
3444Ussop[email protected]10/21/2021null

 

Thanks in advance for the help.

2 Replies

  • Anonymous , with help from an independent date table for slicer

     

    Started in range and end after Range =
    var _max = minx(allselected(Date), Date[Date])
    var _min = maxx(allselected(Date), Date[Date])
    return
    calculate(count(Table[Project Number]), Filter(Table,(Table[CreatedDate] <=_max && Table[CreatedDate]) >=_min ) )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    According to your description,data slicer is from 10/01/2021 to 10/31/2021 then you can still retrieve at least Zoro's and Luffy's information? Why Luffy does not meet your criteria? 

    If it is possible, please provide some sample more and desired output.

     

    Best Regards

    Community Support Team _ polly

     

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