Qlik Community

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

Announcements
IMPORTANT: PLEASE READ - Labels will be required in the NPrinting forum starting on Friday September 26, 2019: Click here for details and instructions.

Create a sorted stacked bar chart in PixelPerfect

Employee
Employee

Create a sorted stacked bar chart in PixelPerfect

The goal of this document is to create a sorted and stacked bar chart by using PixelPerfect.

010 PxP Auto Generated Series Chart.jpeg

The original source QlikView object contains two dimentsions (Country and Salesman) and one measure (sales):

020 PxP Auto Generated Series Chart.jpeg

First add a measure with the sum of the sales for each salesman. We will use it to sort the chart. Create a new expression with the formula sum(TOTAL <Salesman> Sales)

030 PxP Auto Generated Series Chart.jpeg

The final source chart will looks like the following:

040 PxP Auto Generated Series Chart.jpeg

save the .qvw and create a Qlik NPrinting connection to it or refresh the cache if you already created the connection. Create a new PixelPerfect template add the cource QlikView table in the Tables node and add a native chart.

Select Side by side bar stacked chart type and press Next two times.

050 PxP Auto Generated Series Chart.jpeg

Remove all the data series a part Series 1, then click on Series Options tab

060 PxP Auto Generated Series Chart.jpeg

To order the bars in descending order based on the total sales of each salesman set Point sort order to Descending and Sort points by Values by using the related drop down menus. Unflag the Show in legend check box. We will use the Series 1 only to order the bars in the final chart, but the series itself will be hide so we don't want to show it in the legend.Click on Next.

070 PxP Auto Generated Series Chart.jpeg

Select the Series Binding tab. Select Salesman in the Argument drop down menu and the new sum total field in the Value drop down menu.

080 PxP Auto Generated Series Chart.jpeg

Open the Auto created Series tab ad set:

- the source chart in the Data Member drop down menu

- Country as Series. This will divide each bar by country

- Salesman as Argument. This will create a bar for each salesman

- Sales as value so the portion for each country in each bar will be calculated based on the sales value

Click on Next until you reach the Series View section.

090 PxP Auto Generated Series Chart.jpeg

Set 0,1 in the Width option to have the narrowest possible bars.

100 PxP Auto Generated Series Chart.jpeg

In the Appearance tab set Transparency to 255. This will made the bar 100% transparent.

110 PxP Auto Generated Series Chart.jpeg

In the Border tab remove the flag in the Visible check box to hide the bar borders. Click on Next.

120 PxP Auto Generated Series Chart.jpeg

In the Point Labels section remove the flag to the Visible check box for the Series 1. We hiddin the series bars, we need also to avoid to show related numbers.

It is your choiche to remove the point labels also for the auto generated series.

130 PxP Auto Generated Series Chart.jpeg

Click on Finish. Resize the chart and run a report preview.

If the bars in the report are not in the correct order go back to Data - Series Binding and be sure that Series 1 is correctly configured.

Labels (1)
Comments
DaniloMatos
New Contributor

Great job. 

Do you know how to keep the colors? For example, if one of the countries has no data, the others countries keep their colors?

In my case, I have a chart, in QlikView, with one dimension and one measure (the colors are calculated in the background color). I want to keep the same behavior in a pixel perfect chart.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2018-09-14 06:53 AM
Updated by: