Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi thanks for readingI'm using 3 tables for this operation.
Date table
Exchange - to USD
Currency | Date | Value |
GBP | October of 2021 | 1.34 |
Data
Coin | DateData | Income |
GBP | October of 2021 | 200000 |
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.
Solved! Go to Solution.
@efroseroc , 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.
@efroseroc , 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.
Thanks @amitchandak, evidently the issue was in the dates. So I just transformed both to test and the Dax expression worked.
Best of luck!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
104 | |
79 | |
68 | |
61 |
User | Count |
---|---|
144 | |
104 | |
103 | |
82 | |
70 |