I have created a Metric for Average Handle time he...
# gooddata-platform
I have created a Metric for Average Handle time here
Copy code
select avg({fact/case_duration})
 where {fact/analyze_case_clicked} = 1 
 and {fact/smart_response_exported} = 0
I'm trying to View BY Message "Smart Response Intent" which is an Text metric When I add Average Handle time to as a bar graph. I can not select Smart Response Intent for view by. I can select other ones such as user but not that one. Why is that? What is the work around?
Hi Doug, generally speaking when attributes are not available in your report / insight, as in your case: “Smart response intent” it is caused by limitations in the model in relation to the metric created and this is why attributes are not available to put into your report. Therefore, I would like to recommend that you that you take a look at the following documentation that will shed more light this on this case for you: https://help.gooddata.com/doc/growth/en/data-integration/data-modeling-in-gooddata/ Additionally you might find this article useful: https://www.gooddata.com/blog/what-a-data-model/ Lastly, I would like to recommend you check out our free GoodData University courses related to modelling that I believe you will find a useful: https://university.gooddata.com/
@Michael Ullock thanks for the response. I have started to skim through it, I do understand data models, so I'm unclear how this will help me answer my question 😞. More or less information I know already. It didn't seem like it explained how your system is interacting with the data model that makes me not be able to use this dimension column as a dimension ONLY when I want to use a custom metric (with a simple count it works great). Ex. I can do smart response intent count bar graph but I can do smart response intent average handle time bar graph. What I want to do is simple. For instance in raw sql, to make a bar graph would be a simple group by. Select Smart Response intent" , avg(handle time) Group by "Smart response intent" Our "data model" is is just One Large Table and then a second table in joins to just to add extra columns. Our Engineering team have not built out facts and dimension tables. I hope your not saying for this to work correctly we need to have a fact table and attributes tables built out
It appears that all Attributes in our Second fact Table do not work, but in our first table do work. The second fact table is just a column extension to the first.
Hi Doug, sorry for the delay in getting back to you. But if the attribute is not linked to the dataset you’re using in the report, it might not be selectable. You need to ensure that there is a relationship between the dataset you’re working with and the dataset containing the attribute you want to use. It’s helpful to watch the arrows between the datasets in your model. To better understand how these relationships work, please see section “Reading the model”: https://university.gooddata.com/understanding-logical-data-model/622931 Regarding when you’re using the CASE WHEN instead and it’s working. This is a good question 🙂 I cannot be sure why it is now working. But when using the CASE WHEN statement it provides a layer of flexibility that might not have been possible previously. It applies conditional logic, aggregation, transformation to create a calculated field that can better fit the specific reporting requirements. This can often make an attribute usable in a report where it might not have been directly selectable due to differences in granularity, data quality, for example.
The extra table is linked by an interaction ID. That is not the issue. I do understand data models and have skimmed through that information. Its not something that is new to me. Unfortunetly, I did not find any answers to the issue. :(
Table 1 Case interaction ID Attribute 1 Attribute 2 Fact 1 Fact 2 Table two Case interaction ID Attribute 3 Attribute 4 Fact 3 Fact 4 Attribute 1,2 work fine. Attribute 3, 4 do not Table 1 and 2 are linked by case interaction id
Sorry that last bit was wrong, it doesn't work in either case
I can't figure out why it works for some metrics and not others. It doesn't matter where the attribute comes from
Hi Doug, just to make sure I understand your setup and what you are trying to do - do I understand it correctly, that you have two datasets in GoodData (I will use the names from your last post): • “Table 1” has “Case interaction ID” in it as its primary key and “fact 1” is in this table with attributes 1 and 2 • “Table 2" has “Case interaction ID” it is as a foreign key (referencing the “Table 1") and attributes 3 and 4 are here And you are trying to use a metric with
and use it with attributes 1 and 2 (and that works) and with attributes 3 and 4 and that does not work? Is that your setup? Or does it look differently? Also if this is the case, what is the cardinality between rows in Table 1 and Table 2 in your database? Can there be multiple rows in Table 2 which have the same “Case interaction ID”? Or is it 1:1 relationship?
It could come from either table, its pretty random
Yes that is correct. The above box should answer your other question
Just for the record, we’ve discussed this in private messages and it is actually related to custom fields/datasets in multi-tenant environments in GoodData Cloud.