Forum Discussion
Filter table buy row talue
Hi guy
I have a data like this
year part cust
2010 100 10
2010 200 15
2005 100 10
2006 150 15
2007 200 10
2008 150 15
2009 100 15
i have loaded the excel table , Now I want to filter this table to have only rows , with the year 2007 and up
how can I do it ?
( I don not see a way to up load files as examples , is it possible to add power bi files and excel file )
thanks)
gidon
gidon after apllied the filter you can change the M Sentence.
change to look like this:
= Table.SelectRows(#"Changed Type", each [year] >= Date.Year(DateTime.LocalNow())-4)
create a parameter and use it the M Sentences. To be dynamic. If i change the parameter the filter is applied. Instead of 4 use the name of your parameter.
follow this link to know more about parameters
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
You can change the parameter value in Edit Query
7 Replies
- BhaveshPatel
Super User
Hi Gidon,
It is similar to the filter in Excel Table. Please see the attached screenshot.Number Filter : Greater than or Equal toFinal Results
- gidon
Helper II
Hello bhavesh ,
I did make the filter as number filter it works fine
i want to do it in smater way i did not fins where to write
the expresion you wrote
=Table.SelectRows(#"Chandeg Type",each[year]>= 2007 )
in my qlik model I load only lines which are current year less 4 , it means only four years of data
what basicaly I am doing , I have an ERP that I analyse for the last five year using qlikview
Now I want to do the same with power BI , step by step
is is possible to attach a file to this message .
i thank you very much for your help
gidon
- BhaveshPatel
Super User
Unfortunately not. You can upload in onedrive or google drive and send me the link.