This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am trying to create a Custom Column but getting an Invalid Identifier Error but not sure what the reason it's happening, also when I try to resolve it by deleting and inserting the headers then then the errors move from one place to another, and I need help to find the error please? Attached three SS fyr.
if List.Contains({[MOHAP Product Registration Status], [MAH Status], [#“M/S Status”], [DDC Status], [DOH Status], [Montaji Reg.status], [#“MOCCAE,ministry of climate change and environment registration status”]}, “Near Expiry”) then “Near Expiry” else if List.Contains({[MOHAP Product Registration Status], [MAH Status], [#“M/S Status”], [DDC Status], [DOH Status], [Montaji Reg.status], [#“MOCCAE,ministry of climate change and environment registration status”]}, “Expired”) then “Expired” else null
This is first error when i copy and paste formulla
This when delete and add one column
This is final place for error
Hi, @ifaizahmadkhan
your quotes shoould be straight like this "". you are using curly quotes. Below is the updated code
if List.ContainsAny({[MOHAP Product Registration Status], [MAH Status], #["M/S Status"], [DDC Status], [DOH Status], [Montaji Reg.status], #["MOCCAE, ministry of climate change and environment registration status"]}, {"Near Expiry"}) then "Near Expiry" else if List.ContainsAny({[MOHAP Product Registration Status], [MAH Status], #["M/S Status"], [DDC Status], [DOH Status], [Montaji Reg.status], #["MOCCAE, ministry of climate change and environment registration status"]}, {"Expired"}) then "Expired" else null
Proud to be a Super User!
Dealing with errors is always a tricky business and time consuming. If you've already spent some time searching for the error without a solution I would advise you to create a (temporary) error report. You can then view the error record/row and the accompanying error message.
How to build an error report is perfectly explained by Radacad in the following blogpost:
https://radacad.com/exception-reporting-in-power-bi-catch-the-error-rows-in-power-query
I've used it myself and it works.
Hope this helps and gets you one step closer to your solution.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.