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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lawrenceabith
Helper IV
Helper IV

Drill Through with just one click directly in the chart

Hi Ted Pattison! I was in a Deep Dive into the Power BI JavaScript API event.

 

Follow my problem:

 

I need a Drill Through with just one click directly in the chart on my app with my own data. Activate a button after the click is not an option for me. Can I deal with events with power bi embedded using Power BI JavaScript API?

 

I would like to click in a bar char and go directly to the detais page without click in a button.

 

I would like a visual custom command without a menu. That's it.

 

Many thanks,

 

Lawrence

lawrence@lawrence.eti.br

 

 

 

 

 

1 ACCEPTED SOLUTION
TedPattison
Microsoft Employee
Microsoft Employee

Yes, you can respond to someone clicking on a bar of a barchart using the Power BI JavaScript API. Add an event handler for the dataSelected event. When it fires, you should be able to use the event argument object passed to the handler to see the dataPoint which contains the data for the bar that was clicked. The data for the dataSelected event will contains a dataPoint object with an Identity value (e.g State="WA" or Region="Eastern Region". You can use that identity value to filter the drill-through page using the page.setFilter and then call page.setActive to move the user to the drill-through page.

 

Does this give you the support you are looking for? 

View solution in original post

2 REPLIES 2
TedPattison
Microsoft Employee
Microsoft Employee

Yes, you can respond to someone clicking on a bar of a barchart using the Power BI JavaScript API. Add an event handler for the dataSelected event. When it fires, you should be able to use the event argument object passed to the handler to see the dataPoint which contains the data for the bar that was clicked. The data for the dataSelected event will contains a dataPoint object with an Identity value (e.g State="WA" or Region="Eastern Region". You can use that identity value to filter the drill-through page using the page.setFilter and then call page.setActive to move the user to the drill-through page.

 

Does this give you the support you are looking for? 

Hi @TedPattison 

 

I think that you give me us a clue. I´ll study and try to create this ideia and when is done I´m back to you.

 

Many thanks,

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.