cancel
Showing results for 
Search instead for 
Did you mean: 
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
Memorable Member
Memorable Member

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
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors