Year to date with PoP on a bar chart

I have the following case: I have a time dimension on the x-axis and a PoP metric and I need to calculate the PoP for the same period of the current year, that is a “year to date”. The problem is if I filter the time dimension with the “year to date”, it takes all the previous years from the x-axis. Is there a way to do what I want?

@luis.silva
Could you clarify a little please.

I think my confusion is that Period over Period (PoP) is usually used to show previous Periods not current period, but it sounds like you want it to show the Current period when you are changing the filter to a previous date range. Is that the case here?
If so what are you expecting the PoP to show when you filter to Current Period?

Imagine that you have a sales metric over 2017, 2018 and 2019 on a bar chart, but the data for the year 2019 only goes until the current date (that’s “year to date” token filter). I want to compare the sales for the same period, that is, beginning of 2018 until 12 june of 2018 and the same for 2017. Using a “year to date” with PoP (Period over Period), want do it, because when you apply the “year to date” filter will remove all the other years from the chart!

What I really want is to compare the same period of the current year (beginnning of the year until now) with the correspondent period, one year back, two years back, all that in a bar chart.

Hope I made my self clear :slight_smile:

Ok I am with you now on the use case.
Did you connect the filter to the PoP measures? if so disconnect it.
This is the only thing I can think of with out seeing the set up myself that would cause this besides a defect.
Just have it connected to the main measure the three PoP measures are created from.
The PoP measure is based in this case minus one year of the Selected Measure when you created the PoP. it is already controlled by the filter that is connected to that Measure. there is no need to connect that same filter to the Pop Measures.
If the filter is only connected the primary Measure, contact support. I agree that it should not be doing that.

Luis,

Consider the following pair of charts. The one on the left shows calendar year, the one on the right shows year-to-date (i.e. rolling 12-month periods):

Are you trying to achieve what I’m showing on the right?

Wayne

Wayne,

Yes, the right option is what I’m trying to achieve. The goal is to compare same period over past years. As an example, imagine that you want to compare sales in the current period, that is from the beginning of the current year until now and you want to see the sales over the same period for the year-1 and year-2 in a bar chart. How can I do this?

Luis


note: The information used is ficticious.

Something I’ve just mocked up, This just uses an area graph and the Period over period. overlaying the two on top of each other you can see what this year to last year performance. I find that the area graph with the opacity of the layer reduced can quickly show you what you need to see.

setup of the POP is using the calendar hierarchy and setting up to look backward 1 year. our calendar is set up with Year >> Month >> Week >> day

I have filtered the calendar with the token current year. so you can see it is filtered then just for 2019 up to the current month.

Hope this helps.

Hi Paul,

That’s not exactly what I’m trying to achieve. What I really need is something like the date token “Year to date”, but instead of filtering from the beginning of the current year until the current date, it should filter for all backward years the same period, e.g., from beginning of 2018 until 13 of june 2018 and the same for 2017… It would be interesting a feature that would do that, something like “Years to date”.

Note: the default aggregation in my case is year and it should sum up all the years until the same day of the year.

I may be wrong here or misunderstanding so apologies for any ignorance on my behalf.

I am sure this is what the POP does for you? Setting up multiple POPs to carry out the function of -1 year or -2 years. When you set the original calendar date aka beginning 2019 until 13th June, the POP then filters again the second bit of data for minus 1 yr. aka the beginning of 2018 until 13th June. like my example shows.
you can repeat the POP minus functions as many times as you wish then and filter accordingly. You can also revisualise this into bar charts also.

As I said, I am not sure if I am fully understanding the original request? My overall understanding of the POP is limited to what training guidance I have found, and the experimental trial and errors I have carried out. So I apologize if I am confusing the matter.

Hi Luis,

Tried to answer more quickly but my internet kept dying!

You can set multiple PoP periods with different offsets, as Paul has observed.

But I’m not certain if you can get the exact presentation you’re looking for.

Let us know if you need help with the presentation issue.

Wayne

Yes, you are right about PoP and I know that I can do what I want this way. however in this case you loose the context, that is, the past years won’t appear on axis. Nothing like an example:

In the image above you have a table with some dates and values and a chart. If you look at the table, you have a PoP-1 and you can see that in 2018 until june you get a sum of 500 hundred, that’s the same sum of 2019 until june. What I would like to have in the chart on the right is to sum up 2018 untill june, because that’s the information that I have for 2019. Perhaps I shouldn’t have put the PoP in the post.

Here’s what I mean about the formatting issue. If you use Open Range Boundary on the To Date filter, and End of Today - 365 Days on the From, and you generate 2 PoP values, the first with - 1 year, the second with -2 years, you’ll end up with something like this:

image

To get the presentation you want, you’ll have to make the bottom axis invisible, and set the series labels instead. Position them outside, and, for each series, set the series overlap to - 20 % or more:

image

You can the labels to the bottom - I just don’t have time to mess around with the spacing.

Now, the last thing you’ll need is a short script to set the labels to the appropriate values given the current data, but that should be simple.

Does that help?

Wayne

Wayne,

That’s a possible way of doing that and I’ve considered that. However, don’t you think that having a time attribute or token that would do that right out of the box would be awesome?

Yes. And I just read your prior post. You’re trying to essentially do partial years, correct, i.e. year-to-date for the current year, same period for prior year, etc?

If so, you can use the Beginning of Current Year token in the From filter.

Wayne

Actually, I think what we really need is the ability to define a time dimension based on rolling periods. Like the ability to create a Fiscal Period but with a rolling end date.

Yes, that’s what I’m trying to do, but without the PoP. Doing this often using scripting and various PoP’s would be time consuming and, in my opinion, that’s a feature that would enhance the way of working with past periods.

By the way, do you have any idea how to change the labels for the solution you appointed?

Luis

Yes, I can dig that up. But before we go there, I think there’s another solution to this that avoids any script or PoP altogether:

Just create 3 identical metric sets: 1st from Beginning of Current Year to End of Today, 2nd from Beginning of Current Year -1 to End of Today -365, 3rd from Beginning of Current Year -2 to End of Today - 730.

I have confirmed that this will give you the data that you want, as follows:

image

As you see, you can still use the X-axis. You’ll just have to adjust the series overlap for each series to 100 %, which will give you this:

image

Wayne

2 Likes

Thanks Wayne. That’s an engenious solution!:hushed:

No problem. Sometimes we’ve got to stick with it until we get the right answer!

Very good solution. Very good… I think i may be stealing this idea for our dashboards. sometimes simplifying the problem and working methodically through is the best way of coming up with the end solution. I read the thought process on this thread and it was beautifully mapped.

Thanks to you both. :slight_smile:

1 Like