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
polaris3028
Helper III
Helper III

Months (Calendar) not Showing the Latest Month

Hi Gurus,

 

Hope this is not too hard to fix. 🙂  I'm using a Calendar table and used Date column as a filter in a report, but everytime I use the Months (Calendar), the latest month is not showing up (first screenshot).  Also, when I use Months as a filter instead, it shows the latest month, but the date starts at 10/19/2017, not 10/1/2017, thus resulting to incorrect count in the views (screenshot 2).  

 

Month Filter.PNGMonth Filter2.PNG

 

Thanks,

Paul

1 ACCEPTED SOLUTION

@polaris3028

 

Maybe you can try parameters. We can use power query functions to define some date parameters like below and use parameter to filter tables:

 

@Today: DateTime.LocalNow()

@OneYearEarlier: Date.AddYears(Date.From(DateTime.LocalNow()),-1) 

 

Power Query M function reference:

 

https://msdn.microsoft.com/en-us/library/mt296606.aspx 

 

Thanks,
Xi Jin.

 

 

View solution in original post

3 REPLIES 3
v-xjiin-msft
Solution Sage
Solution Sage

@polaris3028

 

For your first question, you can refer to this article: Use a relative date slicer and filter in Power BI Desktop. When selecting Months (Calendar), the visuals constrained would only show the complete calendar months. It also means since January 2018 is not a complete month for now. The Slicer cannot catch it when selecting Months (Calendar). And this is by design.

 

Then for your second question, if you are selecting Months. It also means you are doing something like the DATEDIFF() function, based on current date and get the day which is 3 months earlier. Current day is January 19, 2018, based on it the day 3 months earlier is October 19, 2017. It’s all right.

 

Thanks,
Xi Jin.

Ok, @v-xjiin-msft. got it.  If it's Slicer's function by design then maybe the're nothing we can do so far.  I'm still wondering if there's a better workaround we can use to capture the dates I'd like to select?

@polaris3028

 

Maybe you can try parameters. We can use power query functions to define some date parameters like below and use parameter to filter tables:

 

@Today: DateTime.LocalNow()

@OneYearEarlier: Date.AddYears(Date.From(DateTime.LocalNow()),-1) 

 

Power Query M function reference:

 

https://msdn.microsoft.com/en-us/library/mt296606.aspx 

 

Thanks,
Xi Jin.

 

 

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.