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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Custom Date Range for a Couple of Visualisations

Hi guys,

 

I've got a report that looks at all time data, however I want to set up two of the widgets to look at data from the last 30 days. Can anyone please suggest a solution?

1 ACCEPTED SOLUTION
vishnurk
Frequent Visitor

If you want to create measure that always calculate for last 30 days as of today for this then you can try as below:

 

Say you have a measure quantity sold for each days

 

last_30days_quantity_sold = CALCULATE(SUM(<quantity_sold column>),FILTER(ALL(<tablename>),datecolmn name>TODAY()-30))

View solution in original post

2 REPLIES 2
vishnurk
Frequent Visitor

If you want to create measure that always calculate for last 30 days as of today for this then you can try as below:

 

Say you have a measure quantity sold for each days

 

last_30days_quantity_sold = CALCULATE(SUM(<quantity_sold column>),FILTER(ALL(<tablename>),datecolmn name>TODAY()-30))

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

There are two solutions. 

1. Add a Visual Level filter. 

2. Add slicers and edit the Interaction. 

Custom_Date_Range_for_a_Couple_of_Visualisations

 

 

Best Regards,
Dale

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

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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