Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi everyone,
I'm facing an issue where I need to hide the URL icon in the totals row of a table visual. The URL icon correctly hides when there are multiple records, but it still appears when there is only one filtered record.
I've used the following DAX measure for the URL:
Links =
VAR AUrl = SELECTEDVALUE(storedetail[AUrl])
RETURN
IF(
ISBLANK(AUrl) || AUrl = "",
BLANK(),
VAR URLs = AUrl &
"?netSales[0]=" & [netsales] &
"&netSales[1]=" & [Loyalty] &
"&netSales[2]=" & [Discount] &
"&storeId[0]=" & SELECTEDVALUE(stores[externalStoreID]) &
"&plazaName[0]=" & SELECTEDVALUE(stores[name]) &
"&email=" & SELECTEDVALUE(storedetail[StoreEmail]) &
"&businessEntity=" & SELECTEDVALUE(storedetail[EntityName])
RETURN
IF(
HASONEVALUE(stores[externalStoreID]) && COUNTROWS(VALUES(stores[externalStoreID])) > 1,
URLs,
BLANK()
)
)
Below is the screen shot for reference
Solved! Go to Solution.
Hi @Sarany03
You can try using ISINSCOPE instead of HASONEVALUE to control when the URL icon appears. ISINSCOPE ensures that the calculation behaves correctly at different levels of granularity in your table visual.
Here’s the modified DAX formula:
DAX
Links =
VAR AUrl = SELECTEDVALUE(storedetail[AUrl])
RETURN
IF(
ISBLANK(AUrl) || AUrl = "",
BLANK(),
VAR URLs = AUrl &
"?netSales[0]=" & [netsales] &
"&netSales[1]=" & [Loyalty] &
"&netSales[2]=" & [Discount] &
"&storeId[0]=" & SELECTEDVALUE(stores[externalStoreID]) &
"&plazaName[0]=" & SELECTEDVALUE(stores[name]) &
"&email=" & SELECTEDVALUE(storedetail[StoreEmail]) &
"&businessEntity=" & SELECTEDVALUE(storedetail[EntityName])
RETURN
IF(
ISINSCOPE(stores[externalStoreID]),
URLs,
BLANK()
)
)
This modification ensures that the URL is displayed only at the row level (when a store ID is in scope) and is hidden in the total row.
More information about isinscope here:
https://www.youtube.com/watch?v=DtOfcsS_pQw
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @Sarany03
You can try using ISINSCOPE instead of HASONEVALUE to control when the URL icon appears. ISINSCOPE ensures that the calculation behaves correctly at different levels of granularity in your table visual.
Here’s the modified DAX formula:
DAX
Links =
VAR AUrl = SELECTEDVALUE(storedetail[AUrl])
RETURN
IF(
ISBLANK(AUrl) || AUrl = "",
BLANK(),
VAR URLs = AUrl &
"?netSales[0]=" & [netsales] &
"&netSales[1]=" & [Loyalty] &
"&netSales[2]=" & [Discount] &
"&storeId[0]=" & SELECTEDVALUE(stores[externalStoreID]) &
"&plazaName[0]=" & SELECTEDVALUE(stores[name]) &
"&email=" & SELECTEDVALUE(storedetail[StoreEmail]) &
"&businessEntity=" & SELECTEDVALUE(storedetail[EntityName])
RETURN
IF(
ISINSCOPE(stores[externalStoreID]),
URLs,
BLANK()
)
)
This modification ensures that the URL is displayed only at the row level (when a store ID is in scope) and is hidden in the total row.
More information about isinscope here:
https://www.youtube.com/watch?v=DtOfcsS_pQw
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.