Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ifaizahmadkhan
New Member

Invalid Identifier Error

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 formullaThis is first error when i copy and paste formullaThis when delete and add one columnThis when delete and add one columnThis is final place for errorThis is final place for error

 

2 REPLIES 2
rubayatyasmin
Super User
Super User

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

 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


ChielFaber
Solution Supplier
Solution Supplier

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.


[Tip] Keep CALM and DAX on.
[Solved?] Hit “Accept as Solution” and leave a Kudos.
[About] Chiel | SuperUser (2023–2) |

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors