How Can We Filter Out Future Months in Power BI?

  • Published
  • Posted in Power BI
  • Updated
  • 2 mins read

In Power BI, we are dealing with different data like sales, revenue, expense, salary. While creating the visualizations or reports, in different cases like year-over-year comparison, YTD comparison or variance, the visual may show value for future months also.

Power BI Filter

The above visual is showing some amounts like income or sales Amount, Amount PY, Amount YTD current year, Amount YTD PY & YTD variance for year 2021.From the visual it is clear that there is a net income till September ( this blog is writing in first of  Oct 2021 & having data till the date).Net Income YTD this month is same  for remaining months as there is no income for future months.I’m writing here two simple codes, if your client wants to see the amount only for completed month,Add two  calculated column in Date table. First for calculating last day of a month.

LastDateOfMonth = endofmonth(DateTable[Date])

Second once is to check whether the month is coming in future or not.

IsFutureMonth = IF(TODAY() > DateTable[LastDateOfMonth], 1, 0)

Now, in the new column IsFutureMonth have two values 1 & 0. You can apply visual level or page level filter as required using this column.

FutureMonth

In the above, a page level filter is applied. There is only year slicer & not filtering for months. But as the applied filter, it is showing only the months till September in this visual as till September is completed

Praisy Joy
Data Analyst
Addend Analytics

Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S.

Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia.

Get a free consultation now by emailing us or contacting us.