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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
razant
New Member

Data import from Access incorrect IIf processing

We have a very simple query in access which has an expr with an IIf statement.
The query processing in Access is correct, but when imported to Excel, it's processed wrong with the wrong results.
The results in Access are correct, but when excel is processing it, it's only returning the else result.

I know this can be achieved another way, but I'd like to know why this is doing that and if it can be fixed as is

query.pngresult in Access.pngresult in excel.png

1 ACCEPTED SOLUTION
razant
New Member

Found the solution to my own problem.

Query needs to be in ANSI 92 syntax to work on both platforms. Excel power query doesn't see * as a wild card, it needs %

Replacing * with % will help it work in excel but not in Access

Replacing the syntax in full like this Expr3: IIf([Field1] ALike "Rt%","-1","2") resolves on both 

 

I hope this helps someone

View solution in original post

1 REPLY 1
razant
New Member

Found the solution to my own problem.

Query needs to be in ANSI 92 syntax to work on both platforms. Excel power query doesn't see * as a wild card, it needs %

Replacing * with % will help it work in excel but not in Access

Replacing the syntax in full like this Expr3: IIf([Field1] ALike "Rt%","-1","2") resolves on both 

 

I hope this helps someone

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.