Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
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
Omega
Impactful Individual
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.

Omega
Impactful Individual
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! 😉

Omega
Impactful Individual
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]))))

 

AlB
Super User
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...?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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