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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Galoyol84
Helper I
Helper I

Line chart with dynamic goal to compare

Hello Community,

I need your help with a line chart.  What I have is a report with three elements: 1) map to select a country, 2) line chart  and

3) indicator slicer.

 

If I select a country one could see the result of an indicator on a line chart. Like this

Captura de pantalla 2020-05-14 a la(s) 20.13.02.png

 

The line chart shows two lines: one is the indicator result for the selected country (solid line) and the other is the indicator result at a regional level (dotted line), the latter remains even if I select another country and that allows a comparisson. I  added the constant line using the option Analytics.

 

The issue I have is when selecting the other indicator in the slicer (Girls secondary school completion) ,the constant line remains and this one should have a different value. My question is:

 

How can I define different constants according to the slicer? 

 

Thanks for any help in advanced

 

2 ACCEPTED SOLUTIONS
AiolosZhao
Memorable Member
Memorable Member

Hi @Galoyol84 ,

 

I think you can use the bookmark function to make it.

 

Create 2 charts and 2 bookmarks for each chart.

 

And when you click the first value of the indicator slicer, do bookmark 1, show chart 1.

click the second value to do bookmark 2 and show chart 2.

 

And chart 1 and chart 2 can have a different constant line.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-xicai
Community Support
Community Support

Hi @Galoyol84 ,

 

To make bookmarks work for every selected options, you may refer to the articles: Use bookmarks to share insights and build stories in Power BI , Dynamic Visuals using Buttons, pay attention to the detail.

 

In addition, you may also create measure like DAX below to include the effect of slicer filter, and put the measure to chart line.

 

Measure1= CALCUALTE(SUM([Value]), ALLSELECTED(Slicer[selection]))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

View solution in original post

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi @Galoyol84 ,

 

To make bookmarks work for every selected options, you may refer to the articles: Use bookmarks to share insights and build stories in Power BI , Dynamic Visuals using Buttons, pay attention to the detail.

 

In addition, you may also create measure like DAX below to include the effect of slicer filter, and put the measure to chart line.

 

Measure1= CALCUALTE(SUM([Value]), ALLSELECTED(Slicer[selection]))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

amitchandak
Super User
Super User

@Galoyol84 , check how it has done in this example based on slicer value the measure has been changed, do it in the same manner,

But that is not that you get from analytic TAB, it a measure

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

AiolosZhao
Memorable Member
Memorable Member

Hi @Galoyol84 ,

 

I think you can use the bookmark function to make it.

 

Create 2 charts and 2 bookmarks for each chart.

 

And when you click the first value of the indicator slicer, do bookmark 1, show chart 1.

click the second value to do bookmark 2 and show chart 2.

 

And chart 1 and chart 2 can have a different constant line.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for the advice. I tried it because it is simple, but it doesn't work. I have charts 1 and 2, one on top of the other and I replaced the slicer with 2 square shapes so I can assign each one a diferent bookmark. Bookmark 1 is when chart 1 is in the front, bookmark 2 is when chart 2 is in the front. The issue is that the charts don't switch between front and back.

 

I'm going to try the second reply I got, but thanks

You need to set "show" or "hide" for chart 1 and chart 2 for the different bookmarks, but not "front" or "back".

 

Then you will make it.

 

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.