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
Anonymous
Not applicable

DAX formula not giving the expected solution

Hi All,

 

I have attached 2 images below.

 

Megha3012_0-1631199526197.png

 

Megha3012_1-1631199526832.png

 

They are both in the same table, just different regions. The problem is, for the region EMEA, I need to apply exchange rates.  Hence I have used the formula below:

 

R+ Order Value = IFERROR(LOOKUPVALUE('R+ Orders'[Material Value in-week],'R+ Orders'[PartPlantbyYearWeekNum],'Part File'[PartPlantbyYearweekNum])/'Part File'[Exchange Rates],BLANK())
 
There is some problem with the formula because, there is no exchange rate for NA and hence R+ Order value column goes blank. 
 
I need to correct the formula in a way, where ther exchange rate is applied to EMEA and NA should not have blank values.
How can I correct the formula above?
 
I am new to powerBI so any help would be appreciated!
 
Thank you!
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Your images are too small to read. Try this:

R+ Order Value = 
  VAR __MaterialValue = LOOKUPVALUE('R+ Orders'[Material Value in-week],'R+ Orders'[PartPlantbyYearWeekNum],'Part File'[PartPlantbyYearweekNum])
  VAR __ExchangeRate = 'Part File'[Exchange Rates]
RETURN
  IF(ISBLANK(__ExchangeRate),__MaterialValue,DIVIDE(__MaterialValue,__ExchangeRate,0))


Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous Your images are too small to read. Try this:

R+ Order Value = 
  VAR __MaterialValue = LOOKUPVALUE('R+ Orders'[Material Value in-week],'R+ Orders'[PartPlantbyYearWeekNum],'Part File'[PartPlantbyYearweekNum])
  VAR __ExchangeRate = 'Part File'[Exchange Rates]
RETURN
  IF(ISBLANK(__ExchangeRate),__MaterialValue,DIVIDE(__MaterialValue,__ExchangeRate,0))


Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks a lot! @Greg_Deckler 

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.