Visual Builder Top N not matching Data Table for same query

Hello,

I have a data table with the Top 10 callers based on the data I have and want to convert it to use the Top N in the Timer Series Visual Builder as it has a nicer visualization. I'm finding that the Top N doesn't give the same results as the Data Table sorted in descending order. I'm pasting the data table query and the Top N query I used. I believe I converted it properly. Can someone tell me what might be wrong?

I pasted the same query filter I used in Data Table into the Panel Filter in Visual Builder. The interval is set to auto; ignore global filter=yes, drop last bucket=yes/no (doesn't make a difference).

I verified that the Data Table results are correct by using Discovery and using the same query filter.

This is the Top N setup:

I'm using ES 5.6.1 and Kibana 5.6.1.

One thing to check for: note that TSVB doesn't use index patterns but the Data Table viz does, so the query that it's using may be looking at more data than the Data Table does.

Hi Tim,
Thanks for the response.

I do have the correct index pattern specified in the Panel Options in TSVB. Also, this is query for counting matching records and the Data Table shows a higher count for some rows than visual builder (some rows match). Discovery tab query matches the Data Table query results.

If I converted the Data Table correctly to TSVB Top N above, are there any other reasons this may not give the same results? Are there any known issues with this and TSVB Top N?

If you are using a query filter on the same set of data for both visualization types, then you wouldn't want to set "ignore global filter = yes", am I right?

I set up some data and tried to reproduce what you are seeing. I ran into a bit of temporary confusion but it was cleared up when I realized that I had 2 different browser tabs with my visualizations and the data wasn't refreshed in sync. Other than that, the sorting is a bit weird when terms have the same count because the data isn't secondarily sorted by the term. But otherwise it looks fine.

So my recommendation is to check to see if your visualizations are up to sync with the latest data.

Hi Tim,

Thanks for the response. What I meant by the same filter is that I typed the same filter in the Panel options, but it doesn't make a difference whether you toggle it the radio button for Global Filter and use the global filter or type it in the panel.

I checked carefully to see that the time frames matched in the query and refreshed several times. As I had mentioned, some rows have the correct count, but others are lower than what it should be compared to the Data Table and Discovery results.

I also tried Cumulative Sum instead of Overall Sum because one of the other posts showed that for counting similar to the problem I had, but the results were the same. What is the correct aggregation to use for my use case: cumulative sum or overall sum?

At any rate, any other ideas on how I can try to match them up to the correct count?

Can you link the other topic(s) you referenced?

I saw a new issue has been filed on TSVB and the Top N visualization: https://github.com/elastic/kibana/issues/14453

Take a look at the issue, it could explain why you are not seeing what you expect.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.