Hello. So I'm trying some calculated measures. My ...
# gooddata-platform
j
Hello. So I'm trying some calculated measures. My model has calls, messages and users per calendar day and want to display the ratio of messages to users per day ONLY. The thing is, in Insights measures that are part of the calculation have to be part of the graph? Can't I display the graph of the calculated measure only? I also tried creating a Metric using the Metric Editor (using a simple SELECT messages / users ). The metric comes up among the choices when creating a new insight but then there's no way to trend by day? I'm sure I'm just missing something. Thanks
b
Hello Johann, you can do even more complicated measures, but the result will always be just one value per line of a table (for now let’s assume table view). So to be able to trend it by day, you will need to include the date (days) as rows in the insight. I am afraid that I won’t be able to give you more specific answer, I would need to see your Logical Data Model and maybe the metrics (measures) you’ve created so far, to better understand what you are trying to accomplish.
j
Thanks for the reply. See pic of my model. What I want to show is a graph of Total Conversations / Total Users and another of Total Messages / Total Users, preferably within the same Insight. I can create that, but it requires me to also include in the Insight graphs of those three raw measures used in the calculated ones, which I don't want to show.
I've also created measures for both using the following MAQL: SELECT Total Conversations / Total Users SELECT Total Messages /  Total Users but when I use them in a line graph it doesn't allow me to trend by Calendar Date
b
Hi Johann, When you say:
it doesn’t allow me to trend by Calendar Date
do you mean, you are not allowed to use calendar date in rows box? You might need to put some kind of aggregation function to your metrics for it to work, can you please try: SELECT SUM(Total Conversations / Total Users)
j
That did it. Thanks!
p
@Johann Tagle To make your metrics work on any date granularity (say monthly trend of average conversations per user), move the aggregations down to the facts like this:
SELECT SUM(Total Conversations)/SUM(Total Users)
👍 1