Forum Discussion
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.
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.
One expression you could try would be-
Measure = CALCULATE(SUM([ValuesColumn]), FILTER(CalendarTable, [YearColumn] >= YEAR(NOW()) - 7))
6 Replies
- donsvensenSkilled Sharer
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
Hope this can help you
/Erik
- marcopeteRegular Visitor
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.
- donsvensenSkilled Sharer
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