Forum Discussion
Capitalgman987
Dec 08, 2024Copper Contributor
How to check if a list is blank and then take action based on the result.
I am a very new with Power Query and M. The following code works as long as the list (lstFund) has a value. If not, the query rightfully errors. How do I check if the list is empty (List.IsEmpty??...
- Dec 16, 2024
Thank you all for your replies. I couldn't get any variation of your suggestions to work. I finally got it to work by using if List.NonNullCount(list Name)<1 then...
Thanks again.
Capitalgman987
Dec 12, 2024Copper Contributor
Kidd_Ip When either list is empty, the following error is returned:
- SergeiBaklanDec 14, 2024Diamond Contributor
Capitalgman987 , that's your decision how to work, but it looks like instead of using default M-script for sql.database you try to use more complex and less reliable in maintenance M-code to generate native query.
By default Power Query will do that job in background.