Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

DAX

Hi All,

 

I have attached 2 images below.

 

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?
 
Any help would be appreciated!
 
Thank you!

 

9 Replies

  • Hello there Anonymous ! If I understood your problem correctly, I think solution may work:

     

    R+ Order Value = 
    IF(
    'R+ Orders'[PartPlantbyYearWeekNum] in { "EMEA", "NA"},
    DIVIDE( 'Part File'[PartPlantbyYearweekNum] , 'Part File'[Exchange Rates] ),
    BLANK()
    )

     

     

    Hope this answer solves your problem! If you need any additional help please tag me in your reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
    Thanks!

    Best regards,
    Gonçalo Geraldes

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi goncalogeraldes ,

       

      Thank you!

      I applied the formula. Now itseems to be blank for both NA and EMEA.

       

       

      • goncalogeraldes's avatar
        goncalogeraldes
        Super User

        I've had a look at your table and isnt it supposed to check the values in the "Region" column rather than the "PartPlantbyYearWeekNum"? Like this:

         

        R+ Order Value = 
        IF(
        'R+ Orders'[Region] in { "EMEA", "NA"},
        DIVIDE( 'Part File'[PartPlantbyYearweekNum] , 'Part File'[Exchange Rates] ),
        BLANK()
        )

         

        Hope this answer solves your problem! If you need any additional help please tag me in your reply.
        If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
        Thanks!

        Best regards,
        Gonçalo Geraldes

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi Anonymous,

     

    Could you provide your pbix file after removing sensitve information?

    I will check it in my environment.

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!