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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Using LOOKUPVALUE for currency conversion

Hi thanks for readingI'm using 3 tables for this operation.

 

Date table

 

Exchange - to USD

CurrencyDateValue
GBPOctober of 20211.34

 

Data

CoinDateDataIncome
GBPOctober of 2021200000

 

The 3 of them are related (One direction).

 

To accoplish this I have the following calculated column:

 

USD = DIVIDE(Data[Income],
                LOOKUPVALUE(Exchange[Value],
                 Exchange[Date],Data[DateData],
                    Exchange[Currency],Data[Coin]
                ),0
            )

 

 

But is working correctly  just on a few rows, most of them are 0.

 

I made another column just with the LOOKUPVALUE and returns blank rows, hence the zeros.

 

Nonetheless I checked many examples and the combination of date and currency do exist.

 

I trimmed the GBP' field in both tables and nothing changed.

 

Any ideas are welcomed.

 

Best regards.

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , for the missing records, means blank or 0, do you have a conversion rate for that date. I doubt that at first .

The second data table might have timestamp , that can be checked by changing data type to datetime and use  format with time, there should not be any time other than 12 AM 

 

if that is case create a date like

 

Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))

 

In power query

DateTime.Date([datetime])

 

Can you share a pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , for the missing records, means blank or 0, do you have a conversion rate for that date. I doubt that at first .

The second data table might have timestamp , that can be checked by changing data type to datetime and use  format with time, there should not be any time other than 12 AM 

 

if that is case create a date like

 

Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))

 

In power query

DateTime.Date([datetime])

 

Can you share a pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak, evidently the issue was in the dates. So I just transformed both to test and the Dax expression worked.

Best of luck!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.