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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Michael_Gold
Frequent Visitor

Show results for last X months of my data

Hello, I have a dataset that shows data ranging from2014 to 2018

There is also a daily calendar table

 

I created a graph and set a date hierarchy of Year&Month (using the drilldown)

Now I would like to present only the last X months from the dataset (without manually entering the range in the filters pane)

However when I try to show the last X months/calendar months the graph does not show any data as it calculates last months from Today ..

 

Screenshot 2022-06-14 190439.png

 

 Would appreciate some help

 

 

3 REPLIES 3
Anonymous
Not applicable

Hey have you created any measures to specialize your need to filter last month data? 

Hi, I did not quite understand the question. I did not create any measure.

I want to present the data only for the last X months in the database

Anonymous
Not applicable

Hi @Michael_Gold ,

 

Please do not use fields in Date hierarchy. Please use YEAR() and MONTH() to create calculated columns in the calendar table and use them.

 

The Date hierarchy automatically creates all the dates for the full calendar year, possibly including dates that are not in the model, which is the reason for the problem.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.