How can I limit the x-axis display (of time) in a line chart to the latest 8 quarters?

Hi All,

 

I have simple cube that has a single time dimension in Quarters. It stores discrete values for every quarter.  It currently has 4 years of data up to the current month (quarter).

 

I have this data displayed in a line chart.  How can I dynamically limit the x-axis display of the data points to the latest 8 quarters?

 

Thanks,

 

Kit Chan

Answers

  • Björn Reuber
    Björn Reuber Employee, Community Captain
    500 Likes Fourth Anniversary 100 Comments 5 Answers

    Hi,

     

    just make a Screen-Selection to the years you want to display.

     

    Regards

    Björn

  • How can I dynamically limit the x-axis display of the data points to the latest 8 quarters?

    to make it dynamical, I see two options:

    • quick: playing around in the layout, so that quarters can be identified as "belongs to the last 8 quarters" or not, and then use this block as a layout filter
    • longer but usable in all reports: build a custom time entity above "quarter", set the members so that 1 member is always related to the last 8 actual quarters (you need a procedure or manual action to update this), and then use this custom time entity in the screen or chart selection

    Regards,

  • Previous Member
    edited March 2020

    Hey Kit! 

     

    image Press on this little button here to add a screen selection as Björn said! 

     

    If you want this dynamic, to always show the actual last 8 quarters, 

     

    image

    go  for this button

     

    kind regards 

     

    Toni

  • Good point !

    i forgot it in my comment.

  • Thanks for the responses.  However, my situation is a bit more complicated.  The screen is a dashboard consisting of multiple graphs.  There are two time pagers to select the year and month.  3 of the graphs shows the current year and the prior year based on the selection of the year pager.  The graph that I want the rolling 8 quarters is the one that is different. 

     

    I want the reference time period to be based on the combination of the year and period pager.  i.e. by selecting 2018, Mar18, it would show rolling 8 quarters based on that date.

     

    Thoughts?

     

     

    Kit

  • Previous Member
    edited March 2020

    what if you try this ?

    • your chart has the only entity Quarter set by row in the axes.
    • in the layout of your chart, add an new entity block and select "quarter". Choose "code" for the display mode.
      image

    • in the Filters tab, select the "quarter" as sorting parameter and set the "keep top" to 8, since you want 8 most recent quartersimage

     

    This filters the top 8 quarters (when sorted in descending order), regardless of the year or month selected using pagers.

  • Previous Member
    edited March 2020

    Close.  The pager on the page limits the display to the selected year.

     

    image

     

    However, I did a test in a new screen without the pager.  Unfortunately, the "sort" appears to be based on the "Q" and not the actual numerical(date) order.

    image

    Kit

  • can you provide with screenshot of the layout ? (Data tab, Axes tab, Filters tab)

  • Previous Member
    edited March 2020

    image

     

    image

    image

    image

    • can you provide a screenshot of what you see when you double-click on block c Quarter ?
    • in the Tab "Options", i would remove "quarter" (because you don't need to show it again, it is already in the axis)
  • Previous Member
    edited March 2020

    As per the suggesting, block c is just entities & relationship.

     

    image

     

    Removing Quarters from the "Options" tab did not affect the display.  It would seem that the page governs everything on the screen.  This is overridden if explicitly select the current and prior years in the "Select" tab.  I would accept displaying 8 quarters based on the current and prior year and not rolling. 

     

    Even with the dynamic select via a cube, I think there would still be a requirement to run a procedure every time the pager changes.

  • If you look at my message of today 4:00 PM, look the second bullet point carefully. You have set the display mode of Quarter to default in block c. Switch it to Code, this should work after that.

  • Ow i am sorry you are right with the inappropriate sorting of the quarters on the X axis, i overlooked it.

    So my solution does not work

  • Björn Reuber
    Björn Reuber Employee, Community Captain
    500 Likes Fourth Anniversary 100 Comments 5 Answers

    Hi,

     

    if you have a customer time entity for the quarters you want to display you can also use a layout-select with "to" and those elements.

    Or (it's static) just select the corresponding years with a layoutselect.

    If you want to have it very dynamic (cause of user interaction) you can also use the procedure Step "Apply Select to Layout"

     

    Regards

    Björn

  • Gerrit Kohrs
    Gerrit Kohrs Active Partner
    Fourth Anniversary 250 Up Votes 10 Comments 25 Likes

    As most of the time, the best answer comes from Björn Reuber 

     

    Kit Chan: The Layout-select with the option "to" is probably the best way to achieve your goal. Using that, the screen selection for year and month will not affect this specific layout. However, keep in mind that whenever you want to have data entry enabled, this feature cannot be used!

     

    Kind regards,

    Gerrit