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

Last 30 days, according to date selection.

Hello everyone.

 

I need make the line chart with the last 30 days, acording to date selection.

My calendar is linked to my sales table.

 

Depending on the filter date selection, I need a line chart with the last 30 days.

EJ: DateSales <= "DateSelection" && DateSales >= "DateSelection - 30".

 

It's not the last 30 days from today. It's from the date selected in the filter.

 

 

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @gabrielvigo

After my test, you may try to this way as below:

Add a last 30 day column for date table

last 30 date = DATEADD('Date'[Date],-30,DAY )

then use this column for the line chart  and basic date column for slicer

for example:

when I select date from 2018-03-09 to 2018-03-23 it returns from 2018-02-07 to 2018-02-21

14.JPG

Best Regards,

Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

In this can we achive if we select only one date for example if we select 2018 -03-09 it should only show last 30 days data from the date selected

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.