Forum Discussion
Condition Statement
- 5 years ago
Hello @karabryan ,
Could you please try to use firstnonblank in your formula like:
LOOKUPVALUE( FIRSTNONBLANK(Currency[NewRate],1), Currency[NewSourceTarget], Booking[NewSourceTarget] Currency[Date], Booking[Date] )If this post helps, then consider Accept it as the solution to help other members find it faster.
Best regards
Dedmon Dai
- 5 years ago
Hi karabryan ,
In order to have a more permanent solution believe you need to do the following:
- Create a measure with the following code:
ExchangeRate = MIN(ExchangeRateTable[ExchangeRate])- Now create a new measure to make the calculation:
Valueconverted = SUMX(Table, Table[Amount] * [ExchangeRate])Be aware that you need to have the columns from your many-to-1 relationship from the oneside on the visualization.
You SUMX table need to be adjusted to your model.
this is just a generic solution needs to be adjusted to your model and needs.
Where are you placing this calculated column? This should be placed in the bookingsteritory or do you want to return the rate in another table?
The parameter that is giving error is the Search value so it's the value you are looking in the other table.
This error is on a measure correct?
- karabryan5 years agoHelper I
And I was using a new column - not a measure. Let me try to switch it to a measure.
- karabryan5 years agoHelper I
I may have found the issue. In the Erp CurrExRate table, the NewRate field was formatted as Text for some reason after I brought it back over. I'm making some changes and will update this if it all works! Thank you!!
- karabryan5 years agoHelper I
Unfortunately that didn't work. Here are my print screens:
The top table is the ERP CurrExRate table. The New Rate is a decimal number now. The second table is the BookingsTerritory table with the new column formula showing in the formula bar. No errors on the formula, but no results, either.
- karabryan5 years agoHelper I
I will send you a private message with the tables.
- v-deddai1-msft5 years agoCommunity Support
Hello @karabryan ,
Could you please try to use firstnonblank in your formula like:
LOOKUPVALUE( FIRSTNONBLANK(Currency[NewRate],1), Currency[NewSourceTarget], Booking[NewSourceTarget] Currency[Date], Booking[Date] )If this post helps, then consider Accept it as the solution to help other members find it faster.
Best regards
Dedmon Dai
- MFelix5 years agoSuper User
Hi karabryan ,
In order to have a more permanent solution believe you need to do the following:
- Create a measure with the following code:
ExchangeRate = MIN(ExchangeRateTable[ExchangeRate])- Now create a new measure to make the calculation:
Valueconverted = SUMX(Table, Table[Amount] * [ExchangeRate])Be aware that you need to have the columns from your many-to-1 relationship from the oneside on the visualization.
You SUMX table need to be adjusted to your model.
this is just a generic solution needs to be adjusted to your model and needs.