Forum Discussion
M-code for getting only required data with bex as source
- Anonymous6 years ago
I wouldn't write m-code unless you have to. From power query, just click the column header and apply a text filter.
Are you talking about the parameters like controlling area and company code which is coming from Bex query??
And
I was thinking if Power query parameters can meet my requirement to filter the required data? do you have any other suggestion, its ok if the data is loading in power bi first and then later if we are omitting the irrelevant part
Anonymous
Correct, unless you're bex query has a paramter that allows you to filter the data then there is nothing you can do from Power Query. Power Query will only allow you to filter the results that have been loaded in this case.
When Power BI pulls the data from the BEx query its simply making a call to the existing query, passing in the required/optional paramters (That are a part of the BEx query) and then returning the results. So if you can't or don't have a way to filter the data out at the BEx side then you'll have to load the data to Power BI and then just filter the results through Power Query. I understand what you're after, ideally you only want to load data that your going to use within Power BI but due to the limiation that you have you'll have to load the data and then filter through Power query.
- Anonymous6 years agoNot applicable
Hi Anonymous
Thanks for your brief explanation helpmed me alot.
Can you suggest a way to filter data via power query( should i go with writing M-code) ? shall i go with Query Parameters any advice?
Regards,
Husna
- Anonymous6 years agoNot applicable
I wouldn't write m-code unless you have to. From power query, just click the column header and apply a text filter.
- Anonymous6 years agoNot applicable
Anonymous
Thank you for your prompt response and very clear explanation....Atleast got to know which is the better option .
Regards,
Husna