I can’t reproduce your problem, I create a simple data like below, it will work well
So I am not sure which part cause this problem. If possible, could you please inform me more detailed information, such as your data structure , sample data and how you create this in powerbi and your current problem(by image or drawings)? Then I will try to reproduce this for you in my environment.
In addition, if you try to recreate the visual, will this work?