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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Histogram chart with percentages

Hi community,

How can i display a histogram as attached (target histogram JPEG file).

I am able to display for each quarter Q1-11,....Q1-12 the amounts (see already done JPEG file).

In fact what i want is to display for each quarter the percentage of each range (<10%,10-20%,.....) against 100% witch represents the total amount for the quarter.

For example the amount for quarter 1-2011:

38.581.634------------------>100%

17.676.848------------------> V %  (represented by green color 30-40%)

7.579.600--------------------> W %

1.346.846--------------------> X  %

8.355.787--------------------> Y %

3.622.551--------------------> Z %

where V+W+X+Y+Z=100 % !

Regards

I want to

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You need to list fields in the list after the total (within the <..>), I believe calculated dimensions won't work.

Try creating an additional field in your data model, where you create your calendar fields:

LOAD

date,

Ceil(Month(date)/3) &'-' & year(date) as QuarterYear,

...

FROM ...;

and then use QuarterYear in your chart as dimension and in the total qualifier field list.

View solution in original post

4 Replies
swuehl
MVP
MVP

In your expression, you probably want to divide your sum(Amount) by the sum(Amount) per quarter:

=sum(Amount) / sum(total<Quarter> Amount)

where Quarter is your Quarter dimension field.

Then change the number format to percentage in number tab.

Hope this helps,

Stefan

Not applicable
Author

Hi swuehl,

I tried your formula but it didn't work.

In fact i have to manage quarters for several years , so i created i calculated dimension as shown below:

=Ceil(Month(date)/3) &'-' & year(date), so it displays 1-2011,2-2011 and so on.....

But when i apply your formula using the above dimension i have error : "no data to display"

swuehl
MVP
MVP

You need to list fields in the list after the total (within the <..>), I believe calculated dimensions won't work.

Try creating an additional field in your data model, where you create your calendar fields:

LOAD

date,

Ceil(Month(date)/3) &'-' & year(date) as QuarterYear,

...

FROM ...;

and then use QuarterYear in your chart as dimension and in the total qualifier field list.

Not applicable
Author

Thank you stefan for your help. It worked as you showed!!

Best Regards

Cherif