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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Showing Last week,month and quarter Data Dynamically

Hello All,

I have a report where I am having 3 pages which have 10 visuals in each page.

In one page I need to show last weeks data

In one page I need to show last Month data

In one page I need to show last Quarter data.

 

For weekly page Like If the user run report anytime in this week I need to show data from 11th June to 17th June.(Previous week)

For Monthlypage Like If the user run report anytime in this month .I need to show data from 1st may to 31st may.(Previous month)

same for quarter (Jan to Mar)

 

Could any one please help how to do this.

2 REPLIES 2
Dhairya
Solution Supplier
Solution Supplier

Hey @Anonymous 
This can also be achieved using page level filter as shown below screenshot, Use the date column from the date table or your dataset for using it in page level filter.

Dhairya_0-1687322634985.png

If this helps please mark my solutions as accepted!

Anonymous
Not applicable

Hi @Anonymous ,

try below steps

 

 

  • Create a Date table: Ensure that you have a Date table in your data model that includes a column with a unique date for each day. If you don't have one, you can create it using Power Query or manually in Power BI Desktop.

  • Create measures or calculated columns: In the Date table or any relevant table, create measures or calculated columns to determine the start and end dates for the desired time periods. Here's an example for the weekly page:

    • Weekly Start Date:

      DAX
  • Weekly Start Date = CALCULATE(MIN(DateTable[Date]), PREVIOUSWEEK(DateTable[Date]))
  • Weekly End Date:

    DAX
    • Weekly End Date = CALCULATE(MAX(DateTable[Date]), PREVIOUSWEEK(DateTable[Date]))

    Similarly, create measures or calculated columns for the monthly and quarterly pages, replacing PREVIOUSWEEK with PREVIOUSMONTH and PREVIOUSQUARTER, respectively.

  • Apply relative date filtering: On the pages where you want to show the last week, last month, or last quarter data, apply relative date filtering to the visuals. Follow these steps:

    • Select the visual you want to apply the filter to.
    • In the Visualizations pane, go to the Filters section.
    • Click on the "Add a relative date filter" icon (calendar with a clock).
    • Choose the relevant date column (e.g., DateTable[Date]).
    • Select the appropriate relative date filtering option (e.g., "In the previous" and set the value to 1 for last week, 1 for last month, or 1 for last quarter).
    • Apply the filter to the visual.
  • Repeat step 3 for all visuals on the respective pages to apply the relative date filtering consistently.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.