I have a question regarding best practices in good...
# gooddata-platform
I have a question regarding best practices in gooddata: I have a financial data set based on multiple currencies. I plan to use a currency dimension, and have a fact table with entries for each item per currency. Here’s the question: Obviously, it doesn’t make sense to sum values across multiple currencies. Is there a way to • make sure there is one currency selected initially? • make sure that users don’t accidentally select 2 or more currencies? • make sure that there is always at least one currency selected?
This is likely not the usual dimension table, but rather a “exactly once” dimension.
Hi Thomas, Although I’m only working in the support team dealing with break/fix issues I’m not entirely sure of your full use case, but I will try and provide as much info as possible to help you implement this. There are a few ways to support multiple currencies here. It is possible to use a M:N relation to map facts in a fact dataset in a single currency to different currencies. Bridge table which implements mapping between source currency and target currency may contain foreign currency exchange range; which can be used in a MAQL formula to convert data from fact table in source currency to target currency. Adding a target currency attribute into a report would lead to data duplication and data would be displayed in multiple currencies. This can be combined with DATA PERMISSIONS to filter data for a specific user and display only a single target currency. Another option is to store data in a fact table redundantly in multiple currencies without M:N relation in the data model and use data permissions to filter data in a given currency for the user. Another option could be to replace data permissions with some mandatory filter in UI which would filter always single currency. This can be probably implemented in some custom UI and the selection of the currency can be then sent as one of the filters of executed insights/dashboards. There is also a great community article previously posted here which you may find useful. https://community.gooddata.com/metrics-and-maql-57/linking-two-unrelated-datasets-in-maql-316 Should anything else be needed to help with your implementation in your LDM, you can reach out to your account owner to discuss options in gaining assistance from our Customer Success Team.
Hi Joseph, thanks for the many options! I will play around with them for a bit to get a feeling for what’s the best option here
👍 1