Forum Discussion
Button with URL link that only can be opened as from specific date
- Anonymous3 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)RETURNIF(_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)
amitchandak NikhilChenna I am trying to implement your measure but it doesn't work. I probably don't create it correctly. Could you please give an example using 1/12/2022 as date and https://community.powerbi.com/ as URL ? My apologies for not understanding!
Hi Anonymous ,
DynamicMeasure =
"https://community.powerbi.com/ "&format("1/12/2022"), "yyyy-mm-dd")
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- Anonymous3 years agoNot applicable
NikhilChenna thanks for this but it doesn't work... the syntax isn't even correct
- NikhilChenna3 years ago
Skilled Sharer
Hi Anonymous ,
Please refer this link,
https://www.youtube.com/watch?v=m4a2c55eXMU
This will help you out.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!