cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SamBerger Helper III
Helper III

Line Chart with Two Fixed Values and One Dynamic

Hi all,

 

I'm trying to create a line chart where two of the lines are stationary, but a third changes when a specific month is chosen from a slicer. Here is the .pbix as reference. 

 

In the 'Date Table' table I am using the [Month & Year] as the Legend entry, and [Week No] as the Axis. Finally the [Unique Pageviews] metric from 'Graph Data' is used as the Values. [Month & Year] is then used as the slicer - here is where I get a bit unstuck as I'd like to November 2017 and November 2018 to be 'hardcoded' into the chart and then for the end-user to select another month to be able to see the comparison.

 

Is this possible?

 

TIA,

 

Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger attached, also a message is added in case month selection is not valid. You can extend it from here.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

9 REPLIES 9
Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger fixed months are always going to be Nov 2017 and Nov 2018?






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





SamBerger Helper III
Helper III

Re: Line Chart with Two Fixed Values and One Dynamic

@parry2k No, they will change month-on-month. So for the report I send out in January it would be December 2018 and December 2017 and so on, These months are always the latest and earliest dates in the dataset though.

 

Thanks! 

 

Sam

Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger so to clarify, you want two line charts,

 

one for most recent month available in dataset

one for earliest month available in dataset






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





SamBerger Helper III
Helper III

Re: Line Chart with Two Fixed Values and One Dynamic

@parry2k No, not quite. Requirements are:

 

- Single line chart with three lines on it

- Two of the lines are fixed, earliest and latest month's data

- Third line can be controlled by slicer.

 

If you take a look at the .pbix I've linked to you'll see a rough idea.

 

Thanks!

Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger got it. only challenge i see it, if user doesn't select a month on slicer or select more than one month, it is going to show the sum of those months. How would you like to address this?

 

Although doing min and max month line is not an issue.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





SamBerger Helper III
Helper III

Re: Line Chart with Two Fixed Values and One Dynamic

Hi @parry2k,

 

These are good questions! Dependent on how things are setup you could specify only single selection on the slicer (if the MIN / MAX dates are elsewhere) - or the other option would be to have some message telling the user that they appear to have selected more than one option (could be based on counting selections, or have a threshold that triggers the message).

 

Sorry, a bit vague!

 

Sam

Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger are you ok to build that logic or you need assistance with that too.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Super User IV
Super User IV

Re: Line Chart with Two Fixed Values and One Dynamic

@SamBerger attached, also a message is added in case month selection is not valid. You can extend it from here.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

SamBerger Helper III
Helper III

Re: Line Chart with Two Fixed Values and One Dynamic

Thank you @parry2k - that was exactly what I was after! Much appreciated Smiley Happy

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors