Forum Discussion

PCorbitt's avatar
PCorbitt
Helper I
3 years ago
Solved

URL Link Issues

Using the following simple measures, I have successfully created working web links on my dashboard. It leads the users to specific landing pages for one type of product or another based on a selected value, but the links are behaving oddly. They are underlined, but not blue, as would be typical, nor am I able to convert them into link icons. 

 

(The two separate measures (one for each type of store) are similar and they look like this): 

BikeURLPass =
var rptfilter = "Directory/StoreType eq "&"'"&SELECTEDVALUE(Directory[StoreType])&"'"
return
rpturl&rptfilter
 
Each of these measures returns a link to the right page, with the right filter. The problem seems to have started after passing it through the last measure which is necessary in order to automatically display the right link for the right store type.
 
URLSelection =
IF (SELECTEDVALUE(Directory[Store]) = BLANK(), [BikeURLPass], [FlowerURLPass]

 

 

Any idea what's wrong?

  • Hi PCorbitt ,

    According to your description, here's my solution. Modify the BikeURLPass measure to:

    BikeURLPass =
    VAR rpturl = "https://app.powerbi.com/groups/me/reports/8590193a-cfd0-4f12-8dfb-d7cca9a91aa1/ReportSection18b2e86904674a27b4a1?experience=power-bi"
    VAR rptfilter =
        IF (
            ISFILTERED ( Directory[StoreType] ),
            "&filter=Directory/StoreType eq " & "'"
                & SELECTEDVALUE ( Directory[StoreType] ) & "'"
        )
    RETURN
        rpturl & rptfilter
    

    Also modify the [FlowerURLPass] measure in this way. By my test, it get correct result.

     

    Best regards,

    Community Support Team_yanjiang

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

2 Replies

  • Hi PCorbitt ,

    According to your description, here's my solution. Modify the BikeURLPass measure to:

    BikeURLPass =
    VAR rpturl = "https://app.powerbi.com/groups/me/reports/8590193a-cfd0-4f12-8dfb-d7cca9a91aa1/ReportSection18b2e86904674a27b4a1?experience=power-bi"
    VAR rptfilter =
        IF (
            ISFILTERED ( Directory[StoreType] ),
            "&filter=Directory/StoreType eq " & "'"
                & SELECTEDVALUE ( Directory[StoreType] ) & "'"
        )
    RETURN
        rpturl & rptfilter
    

    Also modify the [FlowerURLPass] measure in this way. By my test, it get correct result.

     

    Best regards,

    Community Support Team_yanjiang

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

  • Thank you so much for your help, but it turned out to be a amateur mistake on my part, solved by simply recategorizing a couple fields! Good to go now but I'm sure I'll have more questions. This forum has been a lifesaver!