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
marcopete
Regular Visitor

Current time in report

Hi everyone.

I'm so new in power BI. I have my third week in this tool and I could resolve so many things in BI projects, but this can't yet, I hope your help.

 

My reports have a certain period, some reports monthly others anual and other differents time view.

 

I want to know how I can the report can do a range based in current year (In this case today 2016).

 

I attach a image for a better understood.

 

powerbi1.jpg

 

I have some measures for the years between 2010 and 2016, but is for the filter surrounded in red, I want to know how i can "say" to power bi show this measure but for the last seven years and make the filter based in current year.

 

For example, when we will be in 2017 shows since 2011 until 2017 whitout a filter and this way in next years and no need for a explicit filter.

 

Thanks everyone.

 

Greetings from Chile.

1 ACCEPTED SOLUTION

One expression you could try would be-

Measure = CALCULATE(SUM([ValuesColumn]), FILTER(CalendarTable, [YearColumn] >= YEAR(NOW()) - 7))

 

 

View solution in original post

6 REPLIES 6

Hi,

 

You can solve this by creating the measure you want to plot as "Measures last 7 years" using DAX and returning blank for periods outside your current period.

 

I have an example of this here

 

demo

 

Hope this can help you

 

/Erik

Thanks for yor answer donsvensen.

 

I made DAX measures since I begin with power BI, but retrning blank not.

 

This measure should be marked for report - level filters?

 

How I use the measure for filter time? I use dax for returning numeric results.

 

Regards.

Hi

 

You should use the new measure as the value in the charts, not as a filter

 

So for year 2009 your dax measure should return BLANK() and then the year (as your axis) won't appear in your chart

 

/Erik

 

 

Appreciate your help but cant show the period i wish.

 

Can you show a standard example to create the measure?

 

I create columns with current date, current year and current month.

 

Thanks.

One expression you could try would be-

Measure = CALCULATE(SUM([ValuesColumn]), FILTER(CalendarTable, [YearColumn] >= YEAR(NOW()) - 7))

 

 

Thanks everyone, this measure adapted to my model made the right thing, I appeciate your help.

 

I was watching this derived post for a complement of this thread.

 

http://community.powerbi.com/t5/Desktop/Display-this-week-amp-this-month-data/m-p/11101/highlight/tr...

 

 

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.