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
a10703
Helper I
Helper I

Chart from current month to the last 12

Hey guys,

 

I hoe you are going well.

 

I want to create one chart that automatically identifies the current date and shows me data for the last 12 months only.

 

I create one measure to find  today date : 

Measure: 

AtualDate = TODAY()

 

and other measure:

DateLast12Months = DATEADD('Table1'[HoradeCriacao], -12, MONTH)

I created a chart and added the Time Created column (my table date and time column) to the X-axis category and the metric I want to analyze to the Y-axis.

 

But i cant add Filters to the chart with these measures.

 

a10703_0-1680288772721.png

 

Someone can help how to create these chart?

 

Thank you for your time!

 

1 REPLY 1
Kieran_Ultra_23
Frequent Visitor

Hi @a10703. I would suggest to create a dedicated date table and connect the new date table to the date column in table 1. This is common best practise in Power BI when working with time/dates. Here is a link to help with that. 

https://radacad.com/power-bi-date-or-calendar-table-best-method-dax-or-power-query 

 

Once you create this 'date table' and connect it to your desired table. You can add the date column from your 'date table' to the filter panel and use reletive filters to select the last 12 months. 

Kieran_Ultra_23_0-1680305065391.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.