Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have data that includes a product name, price and how long it took to sell (see table below).
I create a stacked bar chart and put Price in Y axis and Time to Sell in the X axis. However, it will combine items - e.g. Sprocket B and C - that have the same values.
How can I get it to display each column as unique product? I'm able to do this with the Scatterplot as I can choose Don't Summarize in both axis. How can I get that same functionality in the bar chart?
I read this post and understand it's a possibility, but it seems in that case that I'd have to replace a unique column ID for either x or y axis, which I don't want to do. Appreciate any help on this.
Product Name | Price | Time to sell |
Sprocket A | $100 | 20 |
Sprocket B | $200 | 40 |
Sprocket C | $200 | 25 |
Sprocket D | $150 | 50 |
Sprocket E | $125 | 10 |
Solved! Go to Solution.
Hi,
Drag Product name to the legend.
Yes, that works. It looks like the solution is to create a column and use this: Column = REPT(UNICHAR(8203),[Time to sell]).
Can you explain why that works? I did some digging and understand what REPT and see what it does but it's still not clear to me on why it works in this context.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
this is the formula = UNICHAR(8203), this is a zero width space.
REPT (UNICAR(8203), [Time to Sell]) - here we repeat this several times .
and so when we pass this along the Y axis, it will not be read, but it will create a uniqueness for each row.
Thank you, I accepted the solution. Could you explain one more thing, I understand the formula adding the zero width space, but if you have two rows with the same value (like B & C with $200 each) then if you add zero width to each, they are still the same and not unique (at least it would seem). So how does that actually make those unique?
This works better but after experimenting I get the same result by dragging the name field into the x-axis. So this led me to something that'll work for me so appreciate that.
uniqueness depends on the value in the Time to sell column
, if there are $200 in A and B and $40 in the Time column, then there will be no uniqueness here, you need to look for another way
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
81 | |
70 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |