Power bi เพ ม button action link page

Power BI has made a lot of recent improvements to button functionality over the last few updates. Among these changes, we can now dynamically set the text of a button! On top of that, we can dynamically set the Web URL that a button can navigate to, creating a nice way to drive traffic from your Power BI report to a web page. In this post, we are going to learn how to set up a button with dynamic text, a dynamic URL, and a dynamic tooltip since these methods go hand-in-hand.

I will start by creating a blank button and placing it on the canvas. I’m going to perform a couple formatting steps to make the button visually appealing, such as making the border round (30 px), setting a fill color for the default state, on hover state, and on press state. Finally, I will give the button some static text for now and make it white. At this point, my button looks as such:

Great, let’s now make our button text dynamic with the help of a measure. I’m going to create a measure called “Dynamic Button Text” and give it the following DAX:

Dynamic Button Text = IF( HASONEVALUE(Videos[title]), MAX(Videos[title]), "Select a Video to Watch" )

This code uses the HASONEVALUE function to determine if I am filtered down to a single video. If so, return the name of the video, else return a simple response such as “Select a Video to Watch.” To be clear, I only want to return the name of a video when a single video is selected with the intention of navigating to that video on the web.

Now we just need to edit the Button Text of the button by clicking on the three dots on the right side of the Button Text field and applying conditional formatting. This will open a menu asking which field or measure we want to use to drive the button text. I will select out new measure titled “Dynamic Button Text” and click OK.

Testing out our new button with dynamic text, we can already see some great results.

Setting up the Dynamic URL and Tooltip will follow almost the exact same steps. Let’s duplicate our previous measure and swap out the Title field for the Video URL field. The final DAX looks as such:

Dynamic Web URL = IF( HASONEVALUE(Videos[Video URL]), MAX(Videos[Video URL]), BLANK() )

Also note that I am returning BLANK() when there is more than one video selected, since I don’t want to navigate anywhere unless I am filtered down to a single video. To finalize, enable Action in the button settings and apply conditional formatting to the Web URL field to use our new measure. While you’re at it, set up the same conditional formatting for the Button Tooltip since it would be nice if the tooltip would tell us where we will be navigating.

And with that, we’re done! Take a look at the final result in the following gif. We successfully have a button that changes text, Web URL, and tooltip based on a selection. How cool is that?

Also, if you’re looking for top Power BI training for a fraction of the price, make sure to check out the BI Elite Training portal! There is a ton of great info available that you’re sure to enjoy.

Parker Stevens

Parker is the creator of the BI Elite YouTube channel, a community of over 30,000 students learning Power BI, DAX, and Power Query. He is a Microsoft Data Platform MVP for his work with Power BI and continues to provide elite Power Platform training courses to help data analysts, BI developers, and citizen dashboard creators reach their goals. Parker is committed to producing high-quality training content that is also extremely cost-effective, to ensure that the largest amount of users can benefit from the content. Training courses located at //training.bielite.com/

I just updated a report based on the new functionality that allows a Button action to be a URL in the conditional formatting box. The URL is a link to Google Maps based on a data field in my model that concatinates an address field with the Google Maps link. When I try it in Desktop, it works perfectly. Ctrl and Click, it brings up the exact address in Google Maps. Then I publish it, and on my iPhone I try again. Nothing. The other Buttons which have bookmarks to other pages in the report work fine. When I tap the button with the URL, nothing.

Bug? Anyone else have this issue? Workaround?

Thanks! Sean

Message of 3

6,994 Views

1 ACCEPTED SOLUTION

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Print
  • Report Inappropriate Content

‎04-17-2019 11:30 PM

@APB ,

Based on my test, the button link to web can't work in power bi mobile. I would suggest you to submit your idea here to help improve power bi. As a workaround, you can create an additional column in your table and set the Data Category to "Web URL" as below:

Community Support Team _ Jimmy Tao

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

Message of 3

6,968 Views

  • All forum topics
  • Previous Topic
  • Next Topic

2 REPLIES 2

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Print
  • Report Inappropriate Content

‎04-17-2019 11:30 PM

@APB ,

Based on my test, the button link to web can't work in power bi mobile. I would suggest you to submit your idea here to help improve power bi. As a workaround, you can create an additional column in your table and set the Data Category to "Web URL" as below:

Community Support Team _ Jimmy Tao

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

Message of 3

6,969 Views

Helpful resources

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Toplist

โพสต์ล่าสุด

แท็ก

ไทยแปลอังกฤษ แปลภาษาไทย ห่อหมกฮวกไปฝากป้าmv โปรแกรม-แปล-ภาษา-อังกฤษ พร้อม-คำ-อ่าน แปลภาษาอาหรับ-ไทย Terjemahan ข้อสอบคณิตศาสตร์ พร้อมเฉลย แปลภาษาอังกฤษเป็นไทย pantip ศัพท์ทางทหาร military words แอพแปลภาษาอาหรับเป็นไทย การ์ดแคปเตอร์ซากุระ ภาค 4 พจนานุกรมศัพท์ทหาร ศัพท์ทหาร ภาษาอังกฤษ pdf ห่อหมกฮวกไปฝากป้า หนังเต็มเรื่อง ไทยแปลอังกฤษ ประโยค lmyour แปลภาษา การ์ดแคปเตอร์ซากุระ ภาค 3 ประปาไม่ไหล วันนี้ ฝยก. ย่อมาจาก หยน ห่อหมกฮวก แปลว่า เมอร์ซี่ อาร์สยาม ล่าสุด แปลภาษาจีน ่้แปลภาษา onet ม3 การ์ดแคปเตอร์ซากุระ ภาค 1 ข้อสอบโอเน็ต ม.3 ออกเรื่องอะไรบ้าง ตตตตลก บบบย ห่อหมกฮวกไปฝากป้า คาราโอเกะ เขียน อาหรับ แปลไทย เนื้อเพลง ห่อหมกฮวก แปลไทย asus zenfone 2e กรมส่งเสริมการปกครองท้องถิ่น การประปานครหลวง ก่อนจะนิ่งก็ต้องกลิ้งมาก่อน เนื้อเพลง ข้อสอบภาษาอังกฤษ ม.ปลาย พร้อมเฉลย คะแนน o-net โรงเรียน ชขภใ ชื่อเต็ม ร.9 คําอ่าน ตัวอย่าง flowchart ขั้นตอนการทํางาน นยน. ย่อมาจาก ทหาร บทที่ 1 ที่มาและความสําคัญของปัญหา ฝสธ. ย่อมาจาก มัดหัวใจเจ้าชายเย็นชา 2 ซับไทย มัดหัวใจเจ้าชายเย็นชา 2 เต็มเรื่อง ยศทหารบก เรียงลําดับ ระเบียบกระทรวงการคลังว่าด้วยการจัดซื้อจัดจ้างและการบริหารพัสดุภาครัฐ พ.ศ. 2560 รัชกาลที่ 10 ห่อหมกฮวกไปฝากป้า คอร์ด