Helo,
I have a question please : I am at the moment working on a canvas dashboard and I am using a dropdown column that I want it to be applied properly on the whole canvas dashboard knowing that I am querying data from multiple indexes. The problem that I am getting is that this filter is only applied on the charts sharing the same index as the filter, and the other charts(using other indexes) get null values. So, How can I solve this problem?
And is there a way, when it's needed, to apply the dropdown column on a specific chart without influencing other charts?
Good morning!! I have good news and less good news, depending on your perspective.
We introduced the concept of "group filtering" recently, which I believe will address your use case! It was backported to Kibana v7.2.0, which should be released very soon...
Still, I'm going to pass this on to our team to be sure this feature will solve the null values problem, in case there is a mitigation we can provide now. In the meantime, can you confirm if the above PR is what you're talking about? Thanks!
I chatted with our team, and one thing you can do for other elements is to remove the filters | portion of the expression at the very beginning. This would allow you to apply the global filters to an element whose index matches, and other elements wouldn't take those filters into account. I realize that would make those other elements non-filterable... but until we ship 7.2, this would be the only way to mitigate.
Thank you so much @clintandrewhall for your quick update. I have just upgraded my ELK stack and the problem is not fixed. Let's say I have two indexes(index1, index2) sharing one of the data, let's call it category.
This is what I am using for the filter:
SELECT category
FROM index1
WHERE category!='null'
GROUP BY category
So the filter will be applied on all the charts related to index1 whereas the charts related to index2 will get null values(if they are metrics) or disappear in the case of pie charts......
So please can you help me to solve this problem
As I told you before : I have multiple charts in my dashboard and I am querying data from different indexes. Let's say I have two pie charts : the 1st is displaying SUM(costs) and different resources (for this I am relying on "index1"). And the 2nd chart is displaying COUNT(status) and different status (for this I am depending on "index2").
For the filter I am using these SQL commands :
SELECT category
FROM index1
WHERE category!='null'
GROUP BY category
->I've chosen "category" for "values column" also for "filter column"
For the record, "category" is shared by both indexes by that I mean that "category" is a common field for both indexes.
So basically the filter will be applied only on the 1st pie chart however I need it to be applied on both charts. I found a solution which is to use two filters and assign each one for each chart based on "filter group name". However, I want to use just one dropdown column.
I hope that my situation is clear now
Note: For all other elements you don't want to be effected by this filter, pass ungrouped=true to the filters function at the beginning of all of those elements, which indicates that the element will only receive global filters with no group name assigned. This way it won't be filtered by any filters that belong to a group, i.e. have a group name assigned to them.
Thank you so much @Catherine_Liu for your response. I tried it but it didn't work.
Here's the first metric:
filters group="group1" ungrouped="true"
| essql
query="SELECT round(SUM(Costs),2) AS sum
FROM "consumption*"
WHERE MONTH(usageEnd)=MONTH(CURRENT_DATE())"
| math "sum"
| metric "$"
| render
Here's the 2nd mteric:
filters group="group1" ungrouped=true
| essql query="SELECT COUNT(category)
FROM "advisor*"
WHERE category='security'"
| math "COUNT_category_"
| metric ""
| render
@wadhah Can you provide a sample of the data in both indices? Are the values in both subscription.keyword fields the same including text case? The filter is case sensitive, so that could be the issue.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.