Question

Top5

  • 21 June 2021
  • 3 replies
  • 47 views

Hi,

 

I trying to filter a tile from my dashboard with the top 5 categories per month. I found this link: https://help.looker.com/hc/en-us/articles/360023638494-Dynamic-Rank-in-Visualization-Using-Parameter that shows an interesting way to do that. However,  when I tried to assign the value of the parameter to a dimension and used it to keep with the top5 I got a bug associated to the group by.

I read others solutions but I want to keep only a view in my explorer and not create a new one a join it with the original.

 

Can someone help me? Thanks. 


3 replies

Can you share the bug associated to the group by?

Hi @yadderace,

This is the bug: Error running query: org.apache.spark.sql.AnalysisException: GROUP BY position 5 is not in select list (valid range is [1, 1]); line 6 pos 9.

SELECT
5 AS cost_table_rank_limit
FROM development.cost_table AS cost_table

GROUP BY 5
ORDER BY cost_table_rank_limit
LIMIT 500

I don’t know why in the group by shows the value and not the name of the variable.

It seems that you are only adding  the parameter to your visualization. Can you share your whole explore or what measures and dimensions you want to include?

Reply