Skip to main content

I am working on a creating a distribution chart. The x axis is discharge bins (gave a drop down to either select average or maximum) and y axis is count of distinct vehicles. we gave user to select parameter bin size. The workbook has these calculations. Now my problem is that when i change bin size, it is not showing bins where there are no vehicles. could anyone please help me? Urgent request. we want to see continuos labels and see which bins there is no average or max self discharge

 

** Also I could get max, average but I also want last non null. The same graph should have an option which can select last non null value in selected date range**

 

This is most toughest for me getting last non null value and having it in the parameter

5 Antworten
  1. 25. Juni 2025, 21:37

    @Vaishnavi Kilambi​ discrete fields generally will not have header values if there is no data. There is an exception if Tableau is aware of the data's range. For example, if there months with no orders, Tableau can still show those months on the header because Tableau understands dates.

    Tableau can also show missing columns for proper bins because it understands the progression of bins. However, Tableau will not show missing columns for conditional string bins, even when all the bins are enumerated.

    In the screenshot there are two bin charts showing the same data (distinct count of vehicle name based on max discharge). The top chart uses proper bins. That is they were created by Tableau from an LOD calculation (MAX discharge for each vehicle name). Even though 5 bins do not have any values, Tableau shows the header for those values. In the bottom chart, the bins were created using a conditional calculation. Only the columns that have values are shown.

    //C_Max Bins (IF)

    IF [C_Max Discharge by Vehicle] <2 Then 'Less than 2'

    ELSEIF [C_Max Discharge by Vehicle] <=3 THEN '2 to 3'

    ELSEIF [C_Max Discharge by Vehicle] <=4 THEN '3 to 4'

    ELSEIF [C_Max Discharge by Vehicle] <=5 THEN '4 to 5'

    ELSEIF [C_Max Discharge by Vehicle] <=6 THEN '5 to 6'

    ELSEIF [C_Max Discharge by Vehicle] <=7 THEN '6 to 7'

    ELSEIF [C_Max Discharge by Vehicle] <=8 THEN '7 to 8'

    ELSEIF [C_Max Discharge by Vehicle] <=9 THEN '8 to 9'

    ELSEIF [C_Max Discharge by Vehicle] <=10 THEN '9 to 10'

    ELSEIF [C_Max Discharge by Vehicle] <=11 THEN '10 to 11'

    ELSEIF [C_Max Discharge by Vehicle] <=12 THEN '11 to 12'

    ELSE "Greater than 12"

    END

     

    @Vaishnavi Kilambi​ discrete fields generally will not have header values if there is no data. There is an exception if Tableau is aware of the data's range.You can't use numerical bins in a CASE or IF statement, so you cannot swap out MAX and AVG bins on one chart. However, you can use two charts and chart swapping/DZV to change the view based on the metric choice.

0/9000