Question

Have a way to filter for multiple items at a time

  • 13 October 2021
  • 4 replies
  • 39 views

Hi team,

 

I work for Walmart and we build looker reports on item data which goes into a million records at a time. i love the speed and efficiency of using looker for such large data sets but one of the functionality that the team would like to have is to be able to filter for 100s and 1000s of Items at a time and at the moment it is difficult to add in so many items into one filter and even after doing so, the looker dashboard breaks

 

Can this feature be implemented or enhanced?


4 replies

Hi, 

Not sure I understand your question or not. So you want to filer items from #100 to #1000 (only see data for this rows). If this is is what you are looking for, you can create one more dimension and in your SQL, using rank() or row_number () function and providing a rank # for the row. 

 

Later on you can use that rank as a filer and set the filer to be “advance option” which allow you to choose “is equal to ”, “is greater than” etc and input your #.

 

Thanks

Hi @Karen Yu 

 

Let me give more details - so there are products within walmart which are identified by a product id which is a numeric value. the data has over 10M rows of distinct product IDs

The use case is that the user would like to filter for 100K product IDs at a time and view the info - how would they do that?

Also consider that there are other users who would like to hit the same looker dashboard for a different set of 100K IDs - so the dashboard should be able to take in the input dynamically and adjust the report as needed

Userlevel 3

You can copy as much filter entries as you want, from f.e. a excel spreadsheet

  1. Not sure whether your product ID is a incremental integer to not (like 1,2,3,4,5...), if yes you just need to make sure your ID is a measure (not a dimension); If it is a dimension, you can use ML code to covert it to a measure. Then in your dashboard, add that ID as a filter (click advanced in the filter setting. Then you can set your default filter value like between 1 and 1,000 etc. User can adjust the value to filter different products;  Link:  https://docs.looker.com/exploring-data/adding-fields/custom-measure
  2. If your product ID is not a integer, then you need to create an extra field (maybe called ‘product_id_rank’ by using row_number () over (order by product_id) in your sql or use ML. After you have this field, you can follow above steps to add that filter. 

 

Reply