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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Chanleakna123
Post Prodigy
Post Prodigy

Disable the Refresh from start date to end date in Power BI using dax

Hi, 

I'd like to disable the data loading in any date due to business requirement. Hence, even the data is having on excel or any other source. but PBI will not load it. Can you please advice how a we going to achieve this ?

4 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @Chanleakna123 -you won't directly use DAX since DAX primarily deals with data calculations and visualizations within the report. Instead, you would control the data loading and refreshing logic through Power Query (M language) or Power BI Service settings

 

In the Power Query Editor, select the date column you want to filter.Apply a Custom Filter to exclude rows with dates between your specified start and end date. You can set up a filter condition like:

Replace StartYear, StartMonth, StartDay, EndYear, EndMonth, and EndDay with your actual date values. This will ensure that any rows between the specified dates won’t be loaded into your data model.

Click Close & Apply to apply the changes. Now, data within that date range will not load into your report.

 

power bi services disabling Scheduled Refresh Between Specific Dates would works.

 

Hope this helps.

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Kedar_Pande
Super User
Super User

To disable data loading in Power BI for certain dates, you can use a Date Filter in Power Query. Follow these steps:

  1. Open Power Query Editor: In Power BI, go to Home > Transform Data.
  2. Find the column that contains the date information.
    Apply a filter by right-clicking the date column and selecting Filter Rows.
    Set a condition to exclude specific dates or date ranges based on your business requirements
  3. Once the filter is set, click Close & Apply to prevent the excluded dates from loading into the data model.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

anmolmalviya05
Super User
Super User

Hi @Chanleakna123 , To achieve your goal of preventing data loading for specific dates in Power BI, below approaches you can consider:

 

1. Power Query Filtering :

You can handle this within Power Query to filter out the unwanted date ranges at the data loading stage:

 

Open Power Query Editor (Home > Transform Data).

Identify the column containing your date information.

Apply a custom filter to exclude the rows that fall within the unwanted date range.

Right-click on the date column, select Filter Rows, and specify the range you want to exclude.

Once set, the data for the excluded dates will not load into your model after you click Close & Apply.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

 

Let's Connect on LinkedIn: https://www.linkedin.com/in/anmol-malviya/?originalSubdomain=in



View solution in original post

v-jiewu-msft
Community Support
Community Support

Hi @Chanleakna123 ,

Based on the description, please try the following methods:

1.Select Transform data to open power query editor.

vjiewumsft_0-1729762752662.png

2.Select new source and get excel.

vjiewumsft_1-1729762764194.png

3.Select the Date column and choose Date filters to filter.

vjiewumsft_2-1729762770318.png

4.Set the filter rows.

vjiewumsft_3-1729762777998.png

5.The filter result is shown below. Besides, close and apply.

vjiewumsft_4-1729762785857.png

You can also view the following documents to learn more information.

Filter by values in a column feature description - Power Query | Microsoft Learn

Filter data (Power Query) - Microsoft Support

 

Best Regards,

Wisdom Wu

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

View solution in original post

5 REPLIES 5
v-jiewu-msft
Community Support
Community Support

Hi @Chanleakna123 ,

Based on the description, please try the following methods:

1.Select Transform data to open power query editor.

vjiewumsft_0-1729762752662.png

2.Select new source and get excel.

vjiewumsft_1-1729762764194.png

3.Select the Date column and choose Date filters to filter.

vjiewumsft_2-1729762770318.png

4.Set the filter rows.

vjiewumsft_3-1729762777998.png

5.The filter result is shown below. Besides, close and apply.

vjiewumsft_4-1729762785857.png

You can also view the following documents to learn more information.

Filter by values in a column feature description - Power Query | Microsoft Learn

Filter data (Power Query) - Microsoft Support

 

Best Regards,

Wisdom Wu

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

Chanleakna123
Post Prodigy
Post Prodigy

@rajendraongole1 , thanks , really interested to know further. 
Can you show me how to do it with the example?

anmolmalviya05
Super User
Super User

Hi @Chanleakna123 , To achieve your goal of preventing data loading for specific dates in Power BI, below approaches you can consider:

 

1. Power Query Filtering :

You can handle this within Power Query to filter out the unwanted date ranges at the data loading stage:

 

Open Power Query Editor (Home > Transform Data).

Identify the column containing your date information.

Apply a custom filter to exclude the rows that fall within the unwanted date range.

Right-click on the date column, select Filter Rows, and specify the range you want to exclude.

Once set, the data for the excluded dates will not load into your model after you click Close & Apply.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

 

Let's Connect on LinkedIn: https://www.linkedin.com/in/anmol-malviya/?originalSubdomain=in



Kedar_Pande
Super User
Super User

To disable data loading in Power BI for certain dates, you can use a Date Filter in Power Query. Follow these steps:

  1. Open Power Query Editor: In Power BI, go to Home > Transform Data.
  2. Find the column that contains the date information.
    Apply a filter by right-clicking the date column and selecting Filter Rows.
    Set a condition to exclude specific dates or date ranges based on your business requirements
  3. Once the filter is set, click Close & Apply to prevent the excluded dates from loading into the data model.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

rajendraongole1
Super User
Super User

Hi @Chanleakna123 -you won't directly use DAX since DAX primarily deals with data calculations and visualizations within the report. Instead, you would control the data loading and refreshing logic through Power Query (M language) or Power BI Service settings

 

In the Power Query Editor, select the date column you want to filter.Apply a Custom Filter to exclude rows with dates between your specified start and end date. You can set up a filter condition like:

Replace StartYear, StartMonth, StartDay, EndYear, EndMonth, and EndDay with your actual date values. This will ensure that any rows between the specified dates won’t be loaded into your data model.

Click Close & Apply to apply the changes. Now, data within that date range will not load into your report.

 

power bi services disabling Scheduled Refresh Between Specific Dates would works.

 

Hope this helps.

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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