Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!