Forum Discussion
stacked bar lables visibilty
a combination of 2 deseases
Hello
I've made a staked bar graph showing number of cases in each medical disease.
I've limited this to paitens with up to a 5 diseases .
I have also have a filter from which I can choose a number from 1 to 5, reffering to the number of disease in a each combination.
However when I go to the cases with more than one desease (2-5) the x axis lables are not clear. the picture I have attached is for 2 disease in a combination however it becomes worse when i choose a highr number.
If it were excel I could have made the disease names written one after the other in the same cell(ctrl+enter)' and that would fix the problem, however here the only soloution came into my mind is to split the text (each desease separated by a + sign) and build a new string with concatenate, but it didn't work out. I managed to split the string but not build a new correct one.
if there was a way that the lables could be like that:
disease a+ (line feed+
disease b+ (line feed)+
disease c
....
up to 5 diseases.
Does someone have an idea how to implement this?
Thanks in advance
Erez
4 Replies
- v-jiascu-msft
Microsoft Employee
Hi Erez,
Did you use the built-in visuals? Or R visual? It seems fair in my test. How did you combine the labels? Please vote on idea here.
Best Regards,
Dale
- erezbFrequent Visitor
Thanks for your reply v-jiascu-msft.
I've used the same slicer as you did.In your graph x-lables seems as I am tring to achieve. My data is located in an sql table I've imported into power Bi.No R is involved here.
One of the fields in this table is the combination fields.The disease combination is concatenated with the '+' character , I.e for an id that has 3 diseases it will be - disease1+disease2+disease3, up to idd holding 5 diseases. The concatenation is done in sql.
Each row in this table corresponds to id fiels also located in the table, One row for each Id and of course as mentioned the combination fields and together with fields (cost, etc).
id disease's combination disease , number of disease ,cost and so on.....
1 disease1+disease2+disease3 3 1000
2 disease1+disease2 2 1300
2 disease1+disease2+disease3+disease3 4 2,000
Is there a solution? Maybe to split the combination and build it again inside Power-Bi.
Thanks again
Erez
- v-jiascu-msft
Microsoft Employee