cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
yaz_d89
Regular Visitor

DAX equvalent of Excel 'ISNA' formula?

Hi,

 

Does the ISNA function held in Excel have an equvalent in Power Bi Desktop? Have tried ISERROR, and various others, however, can't find one that works. I have a data source in Excel which I'm trying to move to Power BI, however, a lookup based on ISNA can't be replicated in the same way.

 

Thanks,

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft
Microsoft

Hi @yaz_d89,

 

In Excel, the #N/A error is returned when the lookup functions can't find a referenced value. In Dax, a BLANK is returned instead of #N/A error when there is no match that satisfies all the search values in LOOKUPVALUE Function (DAX). In this scenario, ISBLANK Function (DAX) should be equivalent of ISNA function in Excel.

 

In addition, there is another difference between lookup functions(VLOOKUP, HLOOKUP, LOOKUP, or MATCH) in Excel and LOOKUPVALUE Function (DAX): If several rows in your table match your criteria, then lookup functions in Excel will only return the first (or last) match. On the contrary, LOOKUPVALUE in DAX may return an error if several rows match your criteria. In this scenario, you may need to use TOPN Function (DAX)  to mimic the behaviour of lookup functions in Excel.

 

Reference: https://thedataspecialist.wordpress.com/tag/lookup-in-dax/

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft
Microsoft

Hi @yaz_d89,

 

In Excel, the #N/A error is returned when the lookup functions can't find a referenced value. In Dax, a BLANK is returned instead of #N/A error when there is no match that satisfies all the search values in LOOKUPVALUE Function (DAX). In this scenario, ISBLANK Function (DAX) should be equivalent of ISNA function in Excel.

 

In addition, there is another difference between lookup functions(VLOOKUP, HLOOKUP, LOOKUP, or MATCH) in Excel and LOOKUPVALUE Function (DAX): If several rows in your table match your criteria, then lookup functions in Excel will only return the first (or last) match. On the contrary, LOOKUPVALUE in DAX may return an error if several rows match your criteria. In this scenario, you may need to use TOPN Function (DAX)  to mimic the behaviour of lookup functions in Excel.

 

Reference: https://thedataspecialist.wordpress.com/tag/lookup-in-dax/

 

Regards

Greg_Deckler
Super User
Super User

 

MyColumn = IF([Column]="#N\A",1,0)

?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors