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

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
Employee
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
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.