Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Date range in dynamic text box

Hi, how can I capture the dates selected in a text box, for example if users select date range of “01/01/2020” to “31/01/2020” for text box to say “Date range: 01/01/2020 to 31/01/2020”?
  • danextian's avatar
    6 years ago

    Hi Anonymous 

     

    Try this:

    Date Range =
    VAR __MIN =
        FORMAT ( MIN ( 'Table'[Date] ), "MM/DD/YYYY" )
    VAR __MAX =
        FORMAT ( MAX ( 'Table'[Date] ), "MM/DD/YYYY" )
    RETURN
        "Date Range: " & __MIN & " to " & __MAX