Forum Discussion

vpcontrol's avatar
vpcontrol
Regular Visitor
6 years ago
Solved

Date between two dates

Hello everyone,   I have a problem with a calendar. I need help. I have a table with two dates.  First date 02/01/2019 Last date 02/03/2019   I want to draw days between DATE INICIO and DATE...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi vpcontrol ,

    I created a sample to implement it that may help you.

    • Create a calendar table. And there is no relationships between the tables.
    Table 2 = CALENDARAUTO()

    • Create a measure.
    Measure = 
    var min_start =  MIN('Table'[Start ])
    var max_fin =MAX('Table'[Finish])
    return
    IF( MAX('Table 2'[Date])>= min_start && MAX('Table 2'[Date]) <= max_fin, 1,0)

    I attached my sample that you can download and check if it is what you want.

     

    Best Regards,

    Xue Ding

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