i guess your If function in your first expression is just testing all your datasets for your condition and is replacing the value of those datasets that do not meet your condition with 0, while your second expression is reducing your datasets to those that meet your condition (set expression can be understand as a filter). That means the dates, where your condition is no met are not available anymore and therefore are missing in your chart.