Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following data structure ...
what i'm trying to do is, to create a 100% stacked bar chart,
and show the count of F1 which has more than 10 and lesser than 10.
have a look at the attached, i'm able to use some operator like F2 > 10, to create tha bar, but since it return -1 and 0 only. i'm not sure how to proceed further, can some one help?
Thanks,
Nick
F1 | F2 |
a | 6 |
a | 3 |
a | 12 |
a | 15 |
b | 1 |
b | 4 |
b | 3 |
b | 16 |
b | 17 |
c | 17 |
c | 4 |
c | 4 |
Hi
It would be useful for me if you could include a picture of what you expect to see.
OK, so I went ahead and put the attached together, not sure if this is what you want?
Hi Nigel,
Exactly like the chart in the qvw i have attached, BUT, in 100% stacked bar chart. and without the -1 , 0 legend, this is because i 'm using operator in the DIMENSION.
i would prefer this to be solved by using if-else statement.
for now, i only know how to use simple operator to play around with it, but i'm sure there's other solution to it.
Thanks,
Nick
Hi Nick
I took off the legend for the dummy dimension (this is needed to produce the stacked chart).
I took off the caption, thats optional but I tend not to use captions, preferring the title instead.
I set the maximum value of the Y-Axis to 1 (100%).
So, see attached for a better example.
Hi Nigel,
We are almost there... 🙂
I need a , b , c to display as bar as well, and able to separate the count above and below 10.
for example, a ,b ,c represent different games, and F2, represent people's score,
so in the chart, i must be able to show, in game a, the ratio of above and below 10.. and so on..
Hi Nick
How about the attached, I put two more examples in.
First should give 100% in total across A/B/C
Second obviously gives 100% for each of A/B/C
Hi Nigel,
Yeah, that's what i need, but what does the 1 and 0 mean in the if (, ,1 ,0) ?
and why is it SUM ? shouldn't it be count?
i still need some times to get use to the synctax...
Thanks for helping....
Hi Nick
That's just my personal preference because I can't get used to using the Count functions and I don't feel like I need to!!
So, the syntax is simply saying "Take a sum of: Where value is > 10 then 1 else 0" which means that each time it finds a row where the value is greater than 10, add 1 to the sum, otherwise add 0 to the sum.
As I say, its just my preference so it would be worth you spending a bit of time to convert it to counts which might be more obvious.