Templated filter to get the max date in Looker Look ML

Dear All,

Would like to hear your thoughts on one of the requirements we're attempting to do in Looker.

Sales and inventory are our two data sets, and they represent two different views. Using Union, we combined these two views to create the derived table. The calendar date is a filter, and both views inside the derived table must become filtered based on the dates that the user inputs. We were able to accomplish this by utilizing a templated filter as per below.

 {% condition filter_name %} sql_or_lookml_reference {% endcondition %}

Now our requirement is slightly different for the Inventory view, it should take the max date from the user input date range and provide the inventory stock.

E.g Example: If today is 4th Aug, then the SOH/SIT measure’s value on 3rd Aug should be displayed. If the last month is selected then Measure should show the values for the last day of that month.  

Please provide your valuable input.

Thank you.


0 2 3,136
2 REPLIES 2
Top Labels in this Space
Top Solution Authors