Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
LP27
Creator II
Creator II

combine two bars into single stacked graph

Hi Everyone,

Please find my issue below- 

I have got the Bar chart as shown below in the picture-

Bar Chart.PNG

 
 
 

 

 

 

 

 

 

 

 

 

It shows two bars for the same Dimension. Ex- Bar 1 = 206699-1001 (363) and Bar 2 = 206699-1001 (32).

Now i want to Show only one Bar as below pic-

show.PNG

 

 

 

 

 

Is there a possible way to do this ?

Note: There is only one Dimension and one Measure for the Bar chart.

 

Thanks in Advance!  

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be instead of creating a dual field... created a new field using RowNo() as RowNum which can be your second dimension. Script

Table:
LOAD compat_no,
	 time,
	 RowNo() as RowNum;
LOAD * INLINE [
compat_no, time
206699-1001, 363
206699-1001, 32
];

image.png

And you can always turn off the legend under Appearance -> Colors and legend - > Show legend OFF 

 

View solution in original post

6 Replies
sunny_talwar

If both of the dimension values are the same why is it not getting merged into a single bar by default?

LP27
Creator II
Creator II
Author

I have used dual function, hence its showing in two different bars.
Now I need to stack one above the other like stacked bar.
sunny_talwar

Then why not use 2 dimensions and one measure...  1st dimension: Text part of the dual function and 2nd dimension: Numeric part of the dual function and then create a stacked view?

LP27
Creator II
Creator II
Author

How is that ?

In my scenario, 

dual function that i have used in Script editor  =  dual(compart_no, Row no()) as Compart_no

My Dimensions - compat_no

My Measure - sum(time)

 

Could you tell me how can i do it for the above scenario?

 

sunny_talwar

May be instead of creating a dual field... created a new field using RowNo() as RowNum which can be your second dimension. Script

Table:
LOAD compat_no,
	 time,
	 RowNo() as RowNum;
LOAD * INLINE [
compat_no, time
206699-1001, 363
206699-1001, 32
];

image.png

And you can always turn off the legend under Appearance -> Colors and legend - > Show legend OFF 

 

LP27
Creator II
Creator II
Author

Thanks Sunny!

It worked 🙂

Appreciate it!