Forum Discussion

SkyIsTheLimit's avatar
SkyIsTheLimit
Frequent Visitor
1 year ago
Solved

Measure as URL in Visual Studio / SSAS

Hi all,

 

I am using Visual Studio to develop a Tabular model in combination with MS SQL/SSAS, so far everything worked fine, or I came up with a workaround, but this time I am stuck and need your help. Previously I have been modeling in Power BI Desktop and there everything is working, but as you know models cannot be changed in PBI anymore if you get them via SSAS.

 

The issue is that I do not have the option to format a measure as Data Category WebUrl in VS. Usually I would have used a calculated column, but in this case it is not possible. The overall goal is to only display URL on a certain level of a matrix visual, to accomplish that I use INSCOPE, but this does not work with a calc col.

 

The only workaround I found so far is using Tabular Editor to connect to SSAS after the model got deployed and change the Data Category there. This works fine in the dev environment but not on test and prod as I do not have the permission there, and instead someone else does the deployment.  

 

Does anyone know how to get the Data Category set in VS for a measure?

 

I would absolutely appreciate your help on this topic.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi SkyIsTheLimit 

     

    Based on my research, there is no straightforward way to change the Data category of a measure to a Web URL, the usual practice is to create custom columns. You mentioned that you can set it up and deploy it in the Tabular Editor, and if possible, try to request permission to make the necessary changes in both test and prod environments. Or work with a colleague who has access to set up and deploy using Tabular Editor.

     

    Add hyperlinks (URLs) to a table or matrix - Power BI | Microsoft Learn

     

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SkyIsTheLimit 

     

    Based on my research, there is no straightforward way to change the Data category of a measure to a Web URL, the usual practice is to create custom columns. You mentioned that you can set it up and deploy it in the Tabular Editor, and if possible, try to request permission to make the necessary changes in both test and prod environments. Or work with a colleague who has access to set up and deploy using Tabular Editor.

     

    Add hyperlinks (URLs) to a table or matrix - Power BI | Microsoft Learn

     

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

  • SkyIsTheLimit's avatar
    SkyIsTheLimit
    Frequent Visitor

    Thanks Anonymous the section "Format link text as a hyperlink" did the trick. I had to change the Measure to be just a little peace of text instead of an url but it works great.

    Matrix_URL:= 
    IF(
    ISINSCOPE(WEB[Name]),
    "URL",
    BLANK()