Forum Discussion
PCorbitt
3 years agoHelper I
Quotation Marks in DAX Measure for URL
Hello everyone! I'm trying to write DAX code to return a measure which includes a SELECTEDVALUE formula to return a URL. Currently this simple formula is just the PBI Service page web address plus t...
- 3 years ago
You need to add this part marked in red into your DAX formula:
Filtered URL Pass =var rpturl = "https://app.powerbi.com/groups/me/reports/587ce61e-d2bd-43b6-b5d4-83d9e84676fc/ReportSectionc1a4fd29..."var rptfilter = "Directory/FullName eq "&"'"&SELECTEDVALUE('Directory'[FullName])&"'"returnrpturl&rptfilter
PCorbitt
3 years agoHelper I
Thank you, powerthru. I'm sure this will work! I'm just not sure how to incorporate your solution into my DAX formula. Currently it reads:
Filtered URL Pass =
var rptfilter = "Directory/FullName eq "&SELECTEDVALUE('Directory'[FullName])
return
rpturl&rptfilter
This formula returns the following URL link:
https://app.powerbi.com/groups/me/reports/587ce61e+d2bd-43b6-b5d4-83d9e84676fc1a4fd29OdO4c1299e?experience-power-bi?filter _ Directory/FullName eq (followed by the SELECTEDVALUE currently returning as John Doe, but needs to be 'John Doe' to work).
Please let me know what I need to change.
Thanks SO much!
poweringthru
3 years agoHelper I
You need to add this part marked in red into your DAX formula:
Filtered URL Pass =
var rpturl = "https://app.powerbi.com/groups/me/reports/587ce61e-d2bd-43b6-b5d4-83d9e84676fc/ReportSectionc1a4fd29..."
var rptfilter = "Directory/FullName eq "&"'"&SELECTEDVALUE('Directory'[FullName])&"'"
return
rpturl&rptfilter
- PCorbitt3 years agoHelper I
It WORKS! Thank you so much for your solution!
- Cobalt22342 years agoRegular Visitor
Hello,
late reply but I had to deal with this issue today.
So, for other readers, I have done as follow :
Just replace in your URL the " by %22
it works,
Regards,
Roland.