I may have found what it's faling, even if I don't know yet how to solve it...
Seems like the Top-12 is being evaluated before checking the value of calendar_hour. The problem is how to modify the measure so it takes into account that each calendar_hour may have a different top-12 of segments.
The set analysis is restricting the record set internally used for your chart before the chart's cube is actually built and aggregation functions are evaluated, hence it also limits the dimensional values by default (just like making manual selections).
If you are using a Sum(If()) instead, the internally used record set is not affected, the aggregation function will loop over all records and then filter by the If() condition, which values to consider for aggregation.