Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to mask a URL in PowerBI

Hi all,

 

I have a doubt about that, is possible set a mask to a URL in a report?

 

I have this URL in a card chart, it changes depending of some filters: 

Can I set the URL to something like this?

And if I click the "Advanced" word opens the Dropbox URL

 

Best regards

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    There is actually a way to do this.

     

    In a table (data source), you must have these two fields: the url link and the name (aka alias) of what you want it to be displayed as.

     

    In the table (visual), add the alias field as you want it to be displayed. Go to "Format Visual" under the Visualizations tab and scroll down to "Specific Column". Choose the alias column, making sure "Apply to values" is set to "ON". 

     

    Scroll down a bit further to "Cell elements" and select the same column again. Go to "Web URL" and set that to "ON". Then, click on the "fx" button.

     

    A new window pops up. Under "Format style" select "Field value" from the drop down and apply to either "Values only" or whatever applies to your case.

     

    Under "What field should we base this on?", select the url field you had in your data source table. Set "Summarization" to "First", then click "OK".

     

    Note: This can work with static/string fields as well as conditional formatted ones. For example, if you want the name displayed to change according to what the url says, or any other criteria, you can create the DAX function in the "Data" view, then apply the steps above to have url aliases that change dynamically. 

     

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Anonymous ,

     

    I'm afraid currently there's no built-in chart have this kind of feature. You can create a custom chart with hyperlink event using some javascript code, please refer to document below:

    https://microsoft.github.io/PowerBI-visuals/tutorials/building-bar-chart/adding-url-launcher-element-to-the-bar-chart/

     

    Community Support Team _ Jimmy Tao

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