Forum Discussion
ChromeMystic
4 years agoHelper I
Need Help Turning my Custom Column into a Custom Function
I am quite new to the might of powerquery, and I am currently trying to build a lookuptable for our KPI Values. With Help from these forums, I managed to build a working formula for my Data. See the ...
- 4 years ago
I think you need more input variables for your function.
Try this:
(D as date, KPI as text, Col as text ) as number => let Lookup = Record.Field( Table.SelectRows(sedKPI, (sedKPI) => (sedKPI[ValidFrom] <= D) and (sedKPI[ValidTo] >= D) and (sedKPI[KPI] = KPI) ){0}, Col ) in LookupYou can call the function like this:
I've updated and attached the pbix that v-yanjiang-msft provided in the prior thread in case you want to take a closer look.
v-yanjiang-msft
4 years agoCommunity Support
Hi ChromeMystic ,
Have you read AlexisOlson 's solution, if it still not be resolved, could you please explain more or show your expected result.
Best Regards,
Community Support Team _ kalyj
ChromeMystic
4 years agoHelper I
Actually I didn't 🙂 Thanks for the headsup