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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Syndicate_Admin
Administrator
Administrator

Dynamic Title on Bar Chart

Good afternoon, I hope you are well.

I have the following difficulty.

I want to create a dynamic title in a 100% stacked bar chart, I have just one table like the image below

Datos.png

With this data, he generated the following graph:

Barra.png

As you can see the chart has a title " All products" that's why I don't have any product selected from the table, but when I select a product from the table the same title still appears, it doesn't change to "Product A" if I select A or B if I select "Product B" etc. but it does change when I add a data slicer with the products, I don't want to add a data slicer, I want to filter by the table. The measure I'm using to try to change the title is as follows:

Title Bar 2 =
var _Filtro = SELECTEDVALUE(dimProducts[Products], "All Products")
RETURN
_Filter

I use this measure here:
Titulo.png

Please I require your help as to why it doesn't turn out what I want, I get the impression that it must be because of some filter context that I am applying wrong or not applying.

Greetings and thank you in advance.

1 ACCEPTED SOLUTION

Hello, Thanks for the help.

In the end the solution was very simple, the table and the graph were not interacting with each other, the default graph had active the (highlight) and not (filter) so when I selected any product from the table the graph moved but did not change the name, I changed the interaction from scrape to filter and what I was looking for worked perfectly.

I tried the original measurement I included in the question and it turned out, I also tried the measurement you indicated above and it works too.

Thank you all for the help, problem solved.

Best regards

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Syndicate_Admin 

You can try the following measure.

Measure = IF(ISFILTERED(dimProducts[Products])=FALSE(),"Total los Productos",SELECTEDVALUE(dimProducts[Products]))

Output

vxinruzhumsft_0-1706496964676.png

 

vxinruzhumsft_1-1706496973093.png

Best Regards!

Yolo Zhu

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

Thank you for your support, but I already fixed the problem

Best regards

Daniel29195
Super User
Super User

@Syndicate_Admin 



check 1 : make sure that the table visual is reading product column from the dimension table .

 

check 2: try this measure

Title Bar 2 =
var _Filtro =
calculate( max(dimProducts[Products] , table_name ) 
return
if ( isfiltered(dimProducts[Products]) , _Filtro , "All Products" 
)
 
 
hope this works for you . 
 
 
 
 
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍
 
 
 

Hello, Thanks for the help.

In the end the solution was very simple, the table and the graph were not interacting with each other, the default graph had active the (highlight) and not (filter) so when I selected any product from the table the graph moved but did not change the name, I changed the interaction from scrape to filter and what I was looking for worked perfectly.

I tried the original measurement I included in the question and it turned out, I also tried the measurement you indicated above and it works too.

Thank you all for the help, problem solved.

Best regards

Fowmy
Super User
Super User

@Syndicate_Admin 

I noticed a _Filter variable should be _Filtero, please try:

Title Bar 2 =
VAR _Filtro =
    SELECTEDVALUE ( dimProducts[Products], "All Products" )
RETURN
    _Filtro
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hello, thanks for your help, but it doesn't work, it still doesn't work.

Greetings and thank you

Daniel29195
Super User
Super User

hello @Syndicate_Admin 

i can give you some fixes, but im pretty sure they wont help .

so for that, is it possible to share the file so that i can take a look , and get back to you ? 

 

best regards

Hello, thank you for your prompt reply.

I can't attach the file, but I'll leave you the post here. If you have trouble seeing the file you can replicate it, it's a simple table with 5 rows and two columns, one for each product from A to E

Link to the publication of the report

https://app.powerbi.com/view?r=eyJrIjoiYzJlOTg5N2ItYTQ3Ni00YjZjLWE0ZTctNDYwOTY0ZjRlNzk1IiwidCI6IjM0M...

Greetings and thank you

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.