Active Member
July 22, 2022
I have one sheet with a long list of unique account numbers (account key). I have another sheet where each account key has multiple rows with data set out in different columns (the F, H and S Terms).
I am looking to do a lookup to consolidate the data so each Key has just one line and I can list the F, H and S on the same line. Formulas for the yellow cells on the Keys tab basically.
I am looking to do this in Power Query ideally but would be good to know how to do in Excel also.
Many thanks
Moderators
January 31, 2022
VIP
Trusted Members
December 7, 2016
VIP
Trusted Members
December 7, 2016
Active Member
July 22, 2022
Hi Anders,
Thanks for your response, that doesn't work the values for the terms are in text format i.e. 30 Days End of Month, 52 End of Month etc if I unpivot and try and summarize in a pivot table the values are useless. That example was just to try and illustrate my problem, my actual spreadsheet is rather large and has a load of other columns in as well as the terms.
If I put the account key into a single list with no duplicates and try to merge it with the master table I want to look up into whenever it see's a duplicate value it adds another row when this is not what I want. I want a single list (no duplicates) of all the account keys and to basically returns the first non blank value for the designated columns i.e. the F,H,S terms (there is more that I will need but just put those so someone could hopefully show me how this is done)
Thanks
Dave
VIP
Trusted Members
December 7, 2016
Active Member
July 22, 2022
If I do that it duplicates the terms where there is more than one term for that type, I wish to basically do a vlookup and return the first non blank value for a designated column. Can this not be done in Power Query, I have the below formula which returns the first match (whether this is blank or not), can this not be adjusted somehow to return the first non blank match?
= try SupplierAccountsImport{Table.PositionOf(SupplierAccountsImport[[Account Key]],[Account Key=[UniqueKey]])}[Haulier Terms] otherwise null
Thanks
Dave
1 Guest(s)