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

Filtrar en PowerQuery

Buenos días,

 

Quería consultaros si saben como aplicar un filtro en un campo fecha sin añadirlo al modelo de datos como una columna adicional, sería como aplicar un filtro sin añadir la columna que deseo filtrar de fecha.

1 ACCEPTED SOLUTION

As you are in Power Query, filter that column and then choose "Quitar" option to remove that column. Once saved, users should not see the column, but filter will work. On the right part of screen you can see steps and last step is removing the column - you can always remove that step if you need that column in future.
Based on screenshot, it seems date is string data type ('ABC'), if you had date column with date data type (calendar icon) you would have dynamic options for filtering date column.

View solution in original post

6 REPLIES 6
nandic
Super User
Super User

Hi @jesuslogmein ,
My spain is not that good, here is the answer in english 🙂
In Power Query you can filter date column on great range of options which are dynamic (like relative filters on slicer): exact date, before/after exact date, between exact days, but also dynamic filters like: last N days, months, years...

Here is screenshot:

date filter power query.PNG

Cheers,
Nemanja 

thanks Nandic, i did it but my problem is diferent, i need filtered without show a colum. For example:

 

In power query (data model)

 DATE : I need filter by date, select 1 to 20 july but i have dates from 1 to 30 of july.

When I close my data model, in excel, I won´t show colum DATE (we ve other colums.

@jesuslogmein ,
If you are using Power BI, you can import that date column, create a filter as on image on previous mail and then remove the column - filter will remain as you are doing this in Power Query which saves all steps.
Alternative is to hide column on modelling view so that users can't see it.
If you are using Power Query in Excel, you can also add filter on Date column and then you can hide column. When you create pivot table based on that model, column will not be shown, but filter will remain.

If none of these help, please share screenshots of your project (current view and how you would like it to display).

Hi, I use power query in excel. I haven´t hide option, we have the followings opt (in spanish hide is "Ocultar")

jesuslogmein_0-1595923648542.png

 

As you are in Power Query, filter that column and then choose "Quitar" option to remove that column. Once saved, users should not see the column, but filter will work. On the right part of screen you can see steps and last step is removing the column - you can always remove that step if you need that column in future.
Based on screenshot, it seems date is string data type ('ABC'), if you had date column with date data type (calendar icon) you would have dynamic options for filtering date column.

ok!!!! thanks!!!!!

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!

Top Solution Authors
Top Kudoed Authors