Hi team, I have a question about how the metrics i...
# gooddata-cloud
m
Hi team, I have a question about how the metrics in the system behave with respect to the date filter on the dashboard. Here, we have the Average Donations visualization, which contains the metric:
Copy code
SELECT SUM({fact/FactDonationIncome.Amount})/COUNT({label/FactDonationIncome.Id})
WHERE {label/FactDonationIncome.FactStatusKey} ="1"
but the value for the average donation doesn't change when the date range is changed. How can I make it so that the value of average is calculated according to the date range? As you can see in the metric, the total is divided by the count of the Id since a single donation is kept in multiple rows in our system so using the default average aggregation on the headline would make it inaccurate. This is a bit of an urgent issue.
j
Hello Maria, this is most likely related to how donation income connects with the date dimension in the LDM. If there are no direct connections through a primary key, you can make them using a BY clause. We have older documentation explaining this as Explicit Lifting, the pics are older but the theory in the LDM is the same.
m
Hello Joseph, The date filter I am using here is the one that is present by default on the dashboard- how can I specify what Date dimension it is using? Also, the table FactDonationIncome has a Date field of its own so I don't see why this might be happening.
j
hmmm... I would need to take a look at the LDM then. Would it be possible to send me a link to the dashboard? You can DM me if you'd like.
m
Yes, sure