How to make a line chart show data for one data point?

I am currently building a screen with time selection labels that select different periods of time and apply this selection to the data on the screen. The time labels: TODAY, THIS WEEK etc. work as intended however there is one item on the screen that does not show data when the TODAY button is clicked. DAY is on the x-axis.

 

For reference, here is a screen grab of the time labels I have built (these labels contain procedures that select the stated time range):

 

The first photo here shows my graph when THIS WEEK is selected:

 

The second photo shows my graph when TODAY is selected:

 

My question is whether it is possible to make the chart in the second photo show a single data point when TODAY is selected. If this is possible, would the chart show a line across the length of the x-axis or would it be a single point?

 

Thank you in advance!

Tagged:

Answers

  • Previous Member
    edited March 2020

    Hi Mitchell Tompkins,

     

    so I'm going to make a few guesses on your setup:

    - you have a date entity down to the day level;

    - you have a cube "THIS WEEK" that is versioned by day and setup to only have values (e.g. 1) for the current week, otherwise null/0;

    - you have a cube "TODAY" that is versioned by day and setup to only have a value for today and nothing else for the rest of the time;

    - the labels call procedures to dynamically filter the date either by the "THIS WEEK" cube or by the "TODAY" cube

    - your chart y axis is on the day level.

    - your chart shows lines, not points/dots.

     

    Am I correct with those assumptions?

    My suggestion is to add another cube, set as dots like this:

    image

     

    In the single selection case it would look like this:

    image

     

    Of course it's far from perfect but could point you in the right direction.

     

    BR, Ray

  • Previous Member
    edited March 2020

    So I've played around with a bit and have a layout that will do the trick. The end result looks like this:

    image

    Above no time filter, below filtered to one item.

     

    This is the layout definition:

    image

    block c: image

    block d: image

    block e: image

  • Previous Member
    edited March 2020

    Hi Ray Martens,

     

    I have revisited your answer to my question and while your approach was helpful, it didn't quite solve the issue.

     

    I have replicated the layout above and although my graph is now showing one data point when TODAY is selected, when any other time range is selected, the markers for block d are visible for every data point in the graph such that it looks like the images in your first reply.

     

    The time labels I have made use custom time entities. If we can assume the month is August, for this month I have placed CURRENT against it and the remaining months are labelled as OTHER. TODAY is set up at TODAY. LAST WEEK and THIS WEEK are set up as shown in the image.

     

    imageimage

     

    Rather than using cubes dimensioned by day etc. as you assumed, the time labels select the dates as they are set up and apply it to the screen, which in turn selects what data is seen on the screen.

    I think the difference in setups is the reason why I still see markers when using your suggested layout. With this new information do you still think there would be a way to show one data point on a graph?

     

    Thanks again!

     

    Mitchell

  • Hi Mitchell Tompkins,

    Maybe there's a difference in the layout. You mention block d being visible. In my layout I marked that one as "Hide this block". Could you check that?

    BR, Ray