Hello GoodData team, I have a question about creat...
# gooddata-platform
m
Hello GoodData team, I have a question about creating and debugging Metrics. For the context, the original datastore used is MongoDB collection. MongoDB collection has Amount and Currency fields. Using GoodData Dashboards > Insights > Table widget, I'm able to view Amount and Currency Attributes. That is, in a Table view, each row represents the expected data. The challenge: I'd like to SUM all attribute values and filter subset of data based on the criteria. I've used following query:
SELECT SUM(*Loan Amount*)
SELECT SUM(*Loan Amount*) WHERE *Loan Currency* = *USD*
However, it appears that filter with
WHERE Attribute = AttributeValue
is not taking effect. As a side note, please suggest what is the best channel to post these type of questions. @Bianca Moldovan
j
Hello Maris, if you are using the platform edition then this is the best channel to post your question. In regards to your maql statement, are you picking the attribute value from the dropdown list to the right of the metric editor:
You may need to also check the LDM and how these two attributes connect there. If they are in different datasets, you may need a by clause to connect certain objects.
šŸ‘€ 1
m
@Joseph Heun just to be safe, yes - for query I'm selecting attribute values.
for the above: 1. what is LDM? 2. attributes are in the same data set (collection)
j
The LDM is the Logical Data Model. Would you be able to provide screenshots of your metric and the report, and details as to what values you are expecting to see vs. what you currently see?
Also, if you are fairly new to MAQL, there is a great free course on creating metrics here: https://university.gooddata.com/getting-started-with-maql
šŸ‘€ 1