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
Anonymous
Not applicable

Relative date filter for whole month in progress and next 12 months

Good morning

I'm trying to apply a date filter relative to a visual in which I just show the data for the full current month and the full 12 months next, I have created calculated columns in the calendar table

Month Difference - Calendar[MONTH] - MONTH(TODAY()) and
Difference year - Calendar[Year]-YEAR(TODAY()) to calculate the difference of years and months respectively with respect to today and use them as an advanced filter of the visual but does not always work by the year change.....
I tried to do it with measures but I was not successful either, it could be done with a measure of Datesbetween(date;starmonth;+3;month) or something??? I don't get it.
Thank you very much for your help

2 REPLIES 2
amitchandak
Super User
Super User

I did not get it completely. this should give this + 12 months

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],startof month(Sales[Sales Date]),13,MONTH))

 

Use date calendar

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Anonymous
Not applicable

Hello again and thanks for the answer, I do not get the visual show me only the current month from start and the next 12 months complete with the measure applied, shows me dates that I would not want to see. My apologies since I have asked it incorrectly, perhaps attaching a screen knows how to explain it better?

Thanks a lot

image.png

PS: Explaining it another way: If relative date filters offered me from the beginning of the current month onwards and not from the current date or from the next month my problem would be solved.image.png

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.