cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Impactful Individual

Can you share a example with some random data?

Anonymous
Not applicable

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.

Impactful Individual

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?

Anonymous
Not applicable

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

Impactful Individual

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]))))`

Super User

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...?

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors