Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SebastianM
Regular Visitor

Stacked column chart: shows 2 times 1 on X axis

Hello all.

 

I have an issue with stacked column chart when data contains only 0 and 1 (or -1) on x axis.

 

From the beginning.
My simplified data:

SebastianM_0-1617822475326.png

I've creted the simpliest chart:

SebastianM_1-1617822536517.png

Looks ok.

When I left only data with, for instance 1 and 2 on X then chart looks like this:

SebastianM_2-1617822679920.png

Also looks great.

 

But... when I have data with 0 and 1 (or -1) then chart draws additional 1 (or -1) like below:

SebastianM_3-1617822769694.png

Do you know how to remove this additional '1' from the chart?
Looks like problem exist only when 0 and 1 or -1 are on the X axis.
(Note: I cannot change X axis Type to Categorical due to other reasons, I need to have Continuous type).

6 REPLIES 6
v-kkf-msft
Community Support
Community Support

Hi @SebastianM ,

You could add a range to the x-axis to remove the additional '1'.

image.pngimage.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello.

 

Thanks, such solution removes additional 1 but it is not a solution for my case. If in data there will be x with value less than Start or greater than End then chart will not show such value.

SebastianM_0-1618251819232.png

 

 

As @tex628 said - I aslo think that this is rather a bug.

@v-kkf-msft I'm not sure what kind of additional error information you need - please tell me.
Expected result is that there will be no additional 1 on the chart in case when data consist only 0 and 1 on X (as described) without changing type to Categorical or providing Start and End on X axis.

Hi @SebastianM ,

You can try to create a new column as a copy of column X and change its format to text. Sort the Column according to the value of the X column.

Then use the Column as the x-axis of the chart, and drag the X field into the filter on this visual.

image.pngimage.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-kkf-msft .

 

Nice one 🙂 Such workaround will eliminates issue and I will apply in some of my cases but not to all of them.
To some cases it cannot be applied if X will be 10 or grater - then sorting won't work properly on X axis.

 

Guys - thanks a lot for your help. I will move forward partially with your suggestion + I just raised an incident.

Hi @SebastianM ,

 

I wish that you will know the cause and solve the problem after raising an incident.

 

Regarding the problem of disorder, you can solve it by sorting Column according to the value of X column.

image.png

Best Regards,
Winniz

tex628
Community Champion
Community Champion

Hi @SebastianM , 

You can work around this by changing the X-axis type to Catagorical:

Gif_4.gif
But honestly speaking i can't grasp why it's behaving that way in continuous either. This might be a bug? 

Br,
J


Connect on LinkedIn

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.