This example works just fine with normal If-clause. The solution is - however - very heavy when there are 10 millions of rows and some other if-conditions in the both clauses. (And in the future the chart should actually show bars on every day on the selected month.)
Because of that I would like to use the SET-analysis. I don't know if it's possible. It would work easily if you have just one time dimension but this case is different.