Forum Discussion

ArchieEric's avatar
ArchieEric
Frequent Visitor
1 year ago
Solved

Selectedvalue date between two dates

Hi I would like to make a column on my table that shows whether the selected value table from a Date table is between twos date fields on the main table.   There is no relationship between the da...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi ArchieEric 

    Please try the following Measure:


    Measure = IF(SELECTEDVALUE(CalendarTable[Date]) >= SELECTEDVALUE('Table'[Start]) && SELECTEDVALUE(CalendarTable[Date]) <= SELECTEDVALUE('Table'[End]) , 1 , 0)

     

    Count rows:

    Count = CALCULATE(COUNTROWS('Table'),FILTER('Table',[Measure]=1))

     

    By using measure, you can dynamically calculate the total number of rows based on the different dates you choose.

    Result:

     

     

     

     

     

     

     

    Best Regards,

    Jayleny

     

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