Forum Discussion
Import lines under conditions in Power Query
Hello Guys,
I have an XLS file holding data from HRs with a structure similar than the following one;
I would like to import data using some conditions based on column values as per below;
- Having a new column with Date populated with corresponding column Date type equals to
- CurrPosition Start, if it does not exists
- Entry Into Company, if it does not exists
- Tech.Ent.In.Company
- Having a system User Name
- All distinct Pers.Nb.
Not sure how I can achieve point 1. I did some merges but it is very heavy and I have to perform crazy conditions.
I am thinking of using unpivot and conditional column but is there a smarter way to do it in Power M Query?
Anyone have a suggestion?
- Anonymous8 years ago
HI Anonymous,
AFAIK, power query excel connector not support add conditions when import data, you can only consider to import whole data and add filters to filter unmatched records.
Apply filter on Date type column when it equal to 'CurrPosition Start','Entry Into Company' or 'Tech.Ent.In.Company'.
Regards,
Xiaoxin Sheng
2 Replies
- AnonymousNot applicable
HI Anonymous,
AFAIK, power query excel connector not support add conditions when import data, you can only consider to import whole data and add filters to filter unmatched records.
Apply filter on Date type column when it equal to 'CurrPosition Start','Entry Into Company' or 'Tech.Ent.In.Company'.
Regards,
Xiaoxin Sheng
- AnonymousNot applicable
Hi Xiaoxin Shen,
Thank you for your prompt reply, that was so simple I overlooked it... starting in PBI is funny sometimes
Enjoy your day,
David