Reply
Highlighted
Regular Visitor
Posts: 38
Registered: ‎05-09-2017
Accepted Solution

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


Accepted Solutions
Super User
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


View solution in original post

Attachment

All Replies
Super User
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


Regular Visitor
Posts: 38
Registered: ‎05-09-2017

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
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


Regular Visitor
Posts: 38
Registered: ‎05-09-2017

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
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


Regular Visitor
Posts: 38
Registered: ‎05-09-2017

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
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


Super User
Posts: 2,063
Registered: ‎07-22-2015

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!

www.perytus.com
(MVP Data Platform)


Attachment
Regular Visitor
Posts: 38
Registered: ‎05-09-2017

Re: Line Chart with Two Fixed Values and One Dynamic

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