cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## accessing last month of timeline

Hey!

I am having data with dates in it. For selecting a Time period, I use a timeline.

So for my report I need to find the relation between the value of the last month and the month bevore the last month of the selected time period within my timeline.

Is this somehow possible?

How can I access the filter criteria of the timeline?

BR,

6 REPLIES 6
Super User III

## Re: accessing last month of timeline

Hi @Anonymous

You're going to have to explain this a bit better.

What do you mean by "relation" and if the period is for instance a month, what value would you want to select in that period? the last day? the average of all days...?

Solution Supplier

## Re: accessing last month of timeline

Can you share a example with some random data?

Anonymous
Not applicable

## Re: accessing last month of timeline

I have data like this:

01.01.2018, Val: 5

01.02.2018: Val: 6

...

01.11.2018: Val: 3

01.12.2018: Val: 9

...

If in the timeline May to October is slected, I want to get the Value of October and September.

If in the timeline January to October is selected, I want to get the Value of October and September.

If in thte timeline January to December is selected, I want to get the Value of December and November.

So for each month, I only have one value.

Solution Supplier

## Re: accessing last month of timeline

If I understand this correctly, what you are trying to say is:

1. Get the last month of the selected timelines
2. Get the data of that month
3. Sum the value in step 2 with the data from the previous month we got from step 1

Right?

Highlighted
Anonymous
Not applicable

## Re: accessing last month of timeline

you are right! But not to sum it up. I want to do some calculations with it then within a measure! 😉

Solution Supplier

## Re: accessing last month of timeline

Try creating the below measure to get the data for last month selected in the timeline:

`Measure = CALCULATE(SUM('Table1'[Value]),FILTER(ALL('Table1'), YEAR('Table1'[Date]) = YEAR(MAX('Table1'[Date])) && MONTH('Table1'[Date])= MONTH(MAX('Table1'[Date]))))`

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors