Multiplying rows, joining tables, currency conversion/exchange rates related

Hi community! I come to you with not a simple question that maybe for now does not have one good solution.

Let’s say I run an international shop in countries with different currencies. I have my main dataset - a table with ids, item type, date, some other fields and a price of that item. I have also another dataset with exchange rates and fields: from_currency (that is EUR), to_currency - more than 80 currencies, exchange_rate and validity of that exchange rate - each rate is valid for one month (starting from beginning to the end of the month so validity looks sth like 2024-01-01).

In my analysis I want to have a parameter as a control that will allow me to convert the currency to any available in the exchange_rates dataset currency and calculate the prices of the items.

I have applied logic that I am left joining exchange_rate to main dataset on [month portion of the date (from main ds)]=[validity (from exchange_rates]. That results in multiplying each row in my dataset by how many currencies (unique to_currency) i have in my exchange_rates. That’s an ‘okay’ solution if I have 1000 rows or so, but I believe that SPICE has some limits when it comes to rows, and lets say I have 50 mln rows that i need to multiply by 80 currencies - that would create a problem with many redundant data multiplied by 80 times just to have 80 exchange rates.

Multiplying columns its also not a great solution because then doing a calculated field in the analysis would result in a never ending ifelse statement and be generally hard to maintain (from my point of view).

Sorry for wide introduction, but my question is:
Is there any other way if I want to avoid multiplying the rows? If we could filter or join by a parameter $SelectedCurrency in the data prep it would be amazing but unfortunately QuickSight does not allow it.

Would appreciate any other ideas if you have :slight_smile: I’ve just started to work with QS so maybe I am not aware of a solution to that

@JRoz ,

If you are using direct query mode, you can use dataset parameters . Did you test as well ?

Kind regards,
Koushik.

Hi @JRoz,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial topic?
If we do not hear back within the next 3 business days, I’ll go ahead and close out this post.

Thank you!

Thank you for your answer! Its indeed valid solution, but it would also slow down dashboards as every time dashboard loads it will call the dataset. We ended up changing our logic.