
Hi everyone,
I'm working on a Tableau visualization and could use some help with a specific requirement.
I have a dataset with Vehicle Name, Date, and Discharge values. Each day contains at most one non-null Discharge value per vehicle. I want to create a dynamic chart that responds to a date range filter.
For each Vehicle Name, I want to identify the last non-null Discharge value within the selected date range. Then I want to bin these last non-null Discharge values, count the distinct vehicle names in each bin, and display this as a discrete bar chart (distribution). The entire chart should update dynamically based on the selected date range.
Any tips on how to approach this logic in Tableau, such as using LOD expressions, table calculations, or filtering strategies, would be much appreciated.
I tried to calculate the [Date of last non null discharge] then use that to calculate the [last non null discharge] and then binned that in the attached workbook. but you have to put the date filter as a "context filter" so it can be activated before the "fixed" calculation. probably there is a better way of doing it but hope this is what you are looking for!