Solved

Single dashboard, two KPIs, use a different time frames

  • 18 August 2022
  • 4 replies
  • 99 views

We have several clients who would like to see two KPI/s on a single dashboard: the first shows a statistic for the last 12 months, the second shows the same statistic for the last month. I know that we can build a single KPI and show it on two dashboards (each with its own timeline), and I know how to build KPIs that include/exclude parent filters. But I have been unable to figure out how to have a KPI rely on a parent filter in one case while another KPI on the same dashboard ignores the parent filter while simultaneously substituting an independent timeframe.

 

We have a system attribute called Timeline and our development team has defined two system metrics, _Timeline_Start and _Timeline_End. These metrics were created from Timeline (Min(Date(Timeline) and Max(Date(Timeline), respectively). To me, the latter would be seem to be of particular importance to this inquiry, presuming that the time line for the common dashboard is selected as the 12-month window. 

Here is an example of the type of dashboard desired, developed in one of our other products (an operational tool, not an analytical tool like GoodData).

Any help/guidance would be greatly appreciated, even if the answer is it can’t be done.

 

I think our license is GoodData Enterprise.

icon

Best answer by Joseph Heun 8 September 2022, 14:02

View original

4 replies

Userlevel 3

Hi Jay,

This should be doable, for sure! Do I understand it correctly, that both of your KPIs for "Previous months, previous 12 month" should be dynamically changing, based on the selected Dashboard filter?

Yes. While we might anticipate that a given person would set the end date of the dashboard filter to be the most recent full month (e.g., since today is 8/19/2022, we would anticipate that the user would probably set the filter end date to July 31, 2022). But a user should remain free to change the filter, such that if this were to happen, both the 12-month period and the previous month should update consistent with the new end date.

 

I’m glad that you think it’s doable - I’m eager to see how it would be down. This is a fairly common request in our industry.

Here is a screen capture of a dashboard:

As you can see from the three KPIs at the top right, the system clearly understands the values which represent the end of my timeline, the start of the timeline per the Date Range filter (30 days less than the end), and a value 365 days prior to the end of my timeline.

What I don’t understand is why the system is able to count incidents which occur between _Timeline_Start and _Timeline_End but not incidents which occur between (_Timeline_End - 365) and _Timeline_End. Here are the relevant metric definitions:

_Timeline_Start: SELECT MIN(Date (Timeline)) BY ALL OTHER WITHOUT PF EXCEPT Date (Timeline)

_Timeline_End: SELECT MAX(Date (Timeline)) BY ALL OTHER WITHOUT PF EXCEPT Date (Timeline)

The 1-month count: SELECT IFNULL(COUNT(incidentID),0) WHERE isRecordable=1 AND Date (Event) BETWEEN _Timeline_Start AND _Timeline_End

The 12-month count: SELECT IFNULL(COUNT(incidentID),0) WHERE isRecordable=1 AND Date (Event) BETWEEN (_Timeline_End - 365) AND _Timeline_End

Userlevel 3

Hi Jay,

Sorry for the delay in responding here. This could be possible with some help from the WITH/WITHOUT PF clause. There is a good article here describing its functionality: 

 

 

However, since you are on the enterprise plan, you can reach out to us directly by opening a support ticket. If you are still needing direct assistance with this, could you please open a ticket so we can look directly into the report/metrics/filters used?

Reply