Forum Discussion
Dynamic Hyperlink Buttons Based on Selection
Hello Team,
I am looking for some creative advice!
Concept -
I created a master spreadsheet that is on SharePoint that I added all of our report direct links to each report and names, etc to so that the users can have one place to "Search Reports" based on keywords, Report Notes we made about it, Name, etc.
Desire -
Have dynamic buttons that based on the selected values, the first button goes to the hyperlink for the first selected, second button goes to the second, etc.
I want to give the users 10 buttons total. Based on the 10 selected and name the button based on the "Report Name" .
Issue -
I am trying to figure out how to get the 1st selected to button 1, 2nd to button 2, etc.
I have the power to add to the spreadsheet columns as needed so any ideas would help us all with this concept. 🙂
Current Measure for the Bookmark Selected - (but need the 2nd, 3rd, etc.)
7 Replies
- AnonymousNot applicable
HI rbartles111213,
Yes, this is possible to be achieved in power bi.
You can enable the button text based on measure that interact with filter selections. Then you can configure its action to 'web URL' with an expression to concatenate URL text strings based on selections.
Regards,
Xiaoxin Sheng
- rbartles111213Helper I
Anonymous man you have my head spinning in a good way 🙂 . Thinking of the measure, how can I get it to know for each button to get specific URL.
Example -
I added an ID column to the table. So IF the selected value is say ID = 1 then use the URL column for the button.
If they choose ID = 4 next then that URL.
If they then choose ID = 119 next then that URL assigned for the button and of course the Report Name column on the button so they know which is assigned to which button.
Then we have a dynamic bookmark button page. 🙂
Thanks in adavance for any assist on this one!
- AnonymousNot applicable
Hi rbartles111213 ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- rbartles111213Helper I
Hello, sorry first time asking for help on here and my company doesn't allow us to add files externally so some dummy image is below.
Basically based on the selected values in a table, activate each button in the order they are in the filtered list. If not selected, don't activate the button. If the button is activated use the web url as the action.Image is the idea but having 10 buttons and 4 would be active based on selected and 6 deactivated.
- rbartles111213Helper I
Thank you for all the help, sorry for the delay just remembered I wanted to give my thanks :).
I have a table and when users select the first 12 rows in a filter for the report name column, the buttons light up white as active basically in order alphabetically and work on click to take you to the report and then the buttons that are past the selected say which button is inactive and show as inactive.
So in short, a custom user interface that we have a full list coming from Excel of all of the reports we have in PBI and a hyperlink in each row. Then the below works from that using the above logic etc.
Dynamic Button 1 Color =IF(ISBLANK(CALCULATE(VALUES('Master Links Dashboard'[Report Name for Button]),FILTER(ALLSELECTED('master links dashboard'),RANKX(ALLSELECTED('master links dashboard'),'Master Links Dashboard'[Report Name],,ASC,Dense) = 1))),"#999999","#FFFFFF")(Have a shortened name column for the button text to always fit)DynamicName =CONCATENATEX ( ALLSELECTED ( 'Master Links Dashboard' ), [Report Name], "," )Report Link 1st Row Selected =CALCULATE(VALUES('Master Links Dashboard'[Report Link]),FILTER(ALLSELECTED('master links dashboard'),RANKX(ALLSELECTED('master links dashboard'),'Master Links Dashboard'[Report Name],,ASC,Dense) = 1))ConditionURL =IF (ISFILTERED ( 'Master Links Dashboard'[Report Name] ),SELECTEDVALUE ( 'Master Links Dashboard'[Report Link] ))