Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am having the following data table in database:
| EmpID | Name | Color | Count |
| 1 | Aman | Red | 8 |
| 2 | Raman | Yellow | 4 |
| 3 | Kamal | Green | 15 |
| 4 | Pawan | Red | 12 |
| 5 | Gagan | Yellow | 9 |
| 6 | Tapan | Green | 2 |
Now i need to draw a chart for that i need data in folloing format.
| EmpID | Name | Red | Yellow | Green |
| 1 | Aman | 8 | ||
| 2 | Raman | 4 | ||
| 3 | Kamal | 15 | ||
| 4 | Pawan | 12 | ||
| 5 | Gagan | 9 | ||
| 6 | Tapan | 2 |
Can anyboby please help me how can i get this type of data?
I think it is related to cross table.
Thanks in advance.
mansi wrote:Can anybody please tell me how i modify the table structure at Qlikview level i think we need to use Cross table.
You don't need to modify the table structure at all. Make a bar chart. Use dimensions Name and Color. Use expression sum(Count). Set it to stacked instead of grouped on the style tab. See attached.
Edit: Added a background color expression to set the colors of the bars to match the color values.
Make a pivot table with EmpID, Name and Color in the Dimensions and sum([Count]) in the expression. Label this Expression as Colors.
Then, on the chart, pick the Color column (drag and drop) and place it on top of Expression column Colors.
hi,
pls see the attached application
thanks
hi,
pls check out this
it shud work
thanks
Thanks Tauqueer for the reply.
My requirement is different. I need to create bar chart as attached.
This chart can be created using the folloing format:
| EmpID | Name | Red | Yellow | Green |
| 1 | Aman | 8 | ||
| 2 | Raman | 4 | ||
| 3 | Kamal | 15 | ||
| 4 | Pawan | 12 | ||
| 5 | Gagan | 9 | ||
| 6 | Tapan | 2 |
Can anybody please tell me how i modify the table structure at Qlikview level i think we need to use Cross table.
Thanks in advance.
Hi
If you have a fixed number of Colors you could load the count into the correct field in the load
if (Color='Red', Count) as Red,
if (Color='Yellow', Count) as Yellow
etc
Regards
Juerg
Thanks Juerg Maier JmiD GmbH Schweiz for the reply.
Hi mansi
you add a picture and I rethink my naming ![]()
Juerg
mansi wrote:Can anybody please tell me how i modify the table structure at Qlikview level i think we need to use Cross table.
You don't need to modify the table structure at all. Make a bar chart. Use dimensions Name and Color. Use expression sum(Count). Set it to stacked instead of grouped on the style tab. See attached.
Edit: Added a background color expression to set the colors of the bars to match the color values.
Thanks John for the reply. You saved lot of efforts.