Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Pp110784
Helper II
Helper II

Web URL not working with dax switch formula

I have a PBI report using a matrix visual. I want to add another column to it which has URL values. I have the URLs to be displayed in a column (plan_5500_link). The data category for this column has been set to web URL. Now since it is a matrix visual, I want to display the URLs only at the 2nd level (PLAN_NAME_GRP level). So I created a measure as such:

Plan 5500 link =
switch(
    true(),
    ISINSCOPE ('ABTTableData'[INVESTMENT_NAME2]), blank(),
    ISINSCOPE ('ABTTableData'[PLAN_NAME_GRP]), MAX('ABTTableData'[plan_5500_link]),
    ISINSCOPE ('ABTTableData'[PLAN_SPONSOR_NAME]), blank()
)
I changed the data category of this measure also to web URL. But when I am adding it to my visual, the Plan 5500 link value is still being displayed only as text. It is not clickable & I cannot get to display it as the URL icon instead of the whole text.
I added the plan_5500_link column separately into the visual, and that column is showing up the URL link & I am able to display it as an icon also. But the issue is this column is having values at all the levels of the matrix:
Pp110784_0-1744380880435.png

 

Is there a way I can display the URL as an icon (as in the last column of the screenshot) but only at the 2nd level of the matrix? Let me know if you need any other details.

1 ACCEPTED SOLUTION

I changed your formula a bit & got it to work 🙂

Plan 5500 link =
VAR CurrentPlanNameGrp = SELECTEDVALUE(ABTTableData[PLAN_NAME_GRP])
IF (
    ISINSCOPE ( 'ABTTableData'[PLAN_NAME_GRP] )
        && NOT ISINSCOPE ( 'ABTTableData'[INVESTMENT_NAME2] ),
    CALCULATE(MAX ( 'ABTTableData'[plan_5500_link] ),ABTTableData[PLAN_NAME_GRP] = CurrentPlanNameGrp), BLANK()
)

 

Pp110784_0-1744400897712.png

Thank you so much for your help @MFelix 

View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Pp110784 ,

 

Believe the problem is on your syntax in my case I have done the following measure:

 

URL LINE VALUE = 
VAR URLValue = "https://www.google.com/search?ie=UTF-8&q={"&SELECTEDVALUE('ABTTableData'[PLAN_NAME_GRP])&"}"
RETURN
IF(ISINSCOPE('ABTTableData'[PLAN_NAME_GRP])&&NOT ISINSCOPE('ABTTableData'[PLAN_SPONSOR_NAME]), URLValue)

 

Has you can see it work correctly:

MFelix_0-1744382810774.png

 

Redo your measure to:

Plan 5500 link =
IF (
    ISINSCOPE ( 'ABTTableData'[PLAN_NAME_GRP] )
        && NOT ISINSCOPE ( 'ABTTableData'[PLAN_SPONSOR_NAME] ),
    MAX ( 'ABTTableData'[plan_5500_link] )
)

Should work

 




Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I changed your formula a bit & got it to work 🙂

Plan 5500 link =
VAR CurrentPlanNameGrp = SELECTEDVALUE(ABTTableData[PLAN_NAME_GRP])
IF (
    ISINSCOPE ( 'ABTTableData'[PLAN_NAME_GRP] )
        && NOT ISINSCOPE ( 'ABTTableData'[INVESTMENT_NAME2] ),
    CALCULATE(MAX ( 'ABTTableData'[plan_5500_link] ),ABTTableData[PLAN_NAME_GRP] = CurrentPlanNameGrp), BLANK()
)

 

Pp110784_0-1744400897712.png

Thank you so much for your help @MFelix 

Glad to know you were able to made it work.

 

Since I did not know how your model was setup I just gave an approximate formula. But happy that I guided you to the correct path.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I applied your formula, but that made all the Plan 5500 links disappear.

 

Pp110784_0-1744393816820.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors