Reputation: 1
We have a situation in which we would like to display a dynamically created link, based on user selection. To make this more understandable we are having the following Situation.
I managed to get as far as figuring out the selected IDs with a measure but whenever I deploy this measure/function into a table column all IDs are returned. I thought I have to do this because hyperlinks only work if the data is given in a table column and the corresponding data category is specified as "Web-URL".
Any ideas on how to solve this? Is this possible?
Appreciate any ideas.
Best, Jonas
Upvotes: 0
Views: 2468
Reputation: 1
Well, this is quite the way I tried to go for. See, if I can clarify the question. In the below picture, you can see that I defined the measure accordingly.
I defined a calculated column by just referencing the measure in the column.
MyURLToColumn = [MyURL]
Finally the result within the matrix visual is the following.
While the URL obtained from the column is properly displayed and used as an hyperlink, the URL includes all IDs (not only the selected ones). Contrarily, the URL from the measure is just the right one (only selected IDs in URL) but it can not be displayed nor used as an hyperlink.
Upvotes: 0
Reputation: 15027
I would create a Measure using the CONCATENATEX function. It can combine the values from multiple rows into one string result.
A crude example:
My URL =
"http://www.example.com/query&id="
& CONCATENATEX (
VALUES ( 'My Table'[My ID] ),
'My Table'[My ID],
"&id=",
'My Table'[My ID], ASC
)
When used in a table (with no other fields used in the Values well) you will get a single row with a concatenated URL
Upvotes: 0