Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Button with URL link that only can be opened as from specific date

Hi, I would like to create buttons with URL links that only can be opened as from a specific date. So for example the link in button 1 only works as from 1 December, button 2 as from 2 December etc....
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi all, I managed to solve it myself. In case anyone needs this in the future, here are the steps:

    • First, add a table with the URLs and what dates you want to allow them to be opened. In 'Column tools', change the data category of the column with URLs to 'Web URL'
    • Then create a DAX measure:
    Open URL =
    VAR _PickDate = CALCULATE(MAX('Table'[Date]),'Table'[Index]=1)
    VAR _Date = FORMAT(_PickDate,"yymmdd")
    VAR _Today = FORMAT(TODAY(),"yymmdd")
    VAR _Link = CALCULATE(MAX('Table'[URL]),'Table'[Index]=1)
    RETURN
    IF(_Today >= _Date, _Link)
    • Next, in the report, insert a button, turn on Action, change Type to 'Web URL' and under 'Web URL' click on the function-button (fx) and select the measure you just created
    • In the Tooltips I added a message for the user explaining why the URL can't be opened (if relevant)