Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

100% stacked bar chart

Hi everyone,

I'm working on a 100% stacked bar chart.

I found some topics in the community regarding this question:

100% Stacked bar chart in Qlik Sense | Qlik Community

100% Stacked Bar Graph

Keywords : TOTAL, ALL & DISTINCT

Regretfully, it doesn't seem to be working in my specific situation.

So, I already created a measure with this expression:

Count([Order Reference Deliveries])/Count(Total <Month> [Order Reference Deliveries])

And I created a stacked bar chart with these dimensions/measures:

2017-10-19 19_41_27-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

This is the result:

2017-10-19 19_45_54-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

So.... what am I doing wrong?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I discovered the problem.

In my chart I used an old master dimension called 'Month', while in the meantime I had also created a master calender with the field 'Month'.

In the chart I replaced the master measure 'with the field, and now it's working:

2017-10-20 10_54_17-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

Knowing that, brings me to a new problem.

In reality I would like to use my master measure 'Period' instead of the Month field....because I want the combination month/year...

My master measure periode has this expression: Monthname(Date)

When I replace the dimension Month by the master dimension Period, I'm back where I started:

2017-10-20 10_57_28-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

... and it's not possible to refer to a master dimension in a expression. So what do I do now? Do I have to get rid of my master dimension 'Period' and re-create it somehow in the master calendar?

View solution in original post

13 Replies
krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

Have you set the Measures Number formatting to %?

Anonymous
Not applicable
Author

Not in the example above. But I did try that, didn't help.

The problem is (in my opinion) that Qlik Sense won't use the <Month> 'filter' in the expression (after Total)

It seems that it divides by the total amount in stead of the amount of the specific month.

Anonymous
Not applicable
Author

I discovered the problem.

In my chart I used an old master dimension called 'Month', while in the meantime I had also created a master calender with the field 'Month'.

In the chart I replaced the master measure 'with the field, and now it's working:

2017-10-20 10_54_17-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

Knowing that, brings me to a new problem.

In reality I would like to use my master measure 'Period' instead of the Month field....because I want the combination month/year...

My master measure periode has this expression: Monthname(Date)

When I replace the dimension Month by the master dimension Period, I'm back where I started:

2017-10-20 10_57_28-Customer Dashboard - Delivery performance _ Werkbladen - Qlik Sense.gif

... and it's not possible to refer to a master dimension in a expression. So what do I do now? Do I have to get rid of my master dimension 'Period' and re-create it somehow in the master calendar?

Mark_Little
Luminary
Luminary

Hi Gert,

Having a quick look I would assume that your  data spans a number of years.

I would try the same thing, but total by the Month Year field, if you have one?

Mark

sunny_talwar

I think you will need to calculate MonthYear field in the script... Master dimension isn't going to work... what is the issue with doing MonthName(Date) as MonthYear in script?

ashishpalkar
Creator III
Creator III

Hi There

I am have similar issue where

I am using 2 dimensions and trying to create % stack graph.

I am using following expression

Please find attached screenshot.

Sum(Aggr(Max(PurchaseQuantity),LoanXID))/Sum(total Aggr(Max(PurchaseQuantity),LoanXID))

any suggestions?

sunny_talwar

May be this

Sum(Aggr(Max(PurchaseQuantity), LoanXID))/Sum(TOTAL <Arranger> Aggr(Max(PurchaseQuantity), LoanXID))

ashishpalkar
Creator III
Creator III

Thanks Sunny, it worked perfectly. 

Anonymous
Not applicable
Author

Let's give you guys an update.

I created a MonthYear field in the script, and now the problem is partly solved:

2018-01-03 11_11_12-KPI² v6 - Delivery performance _ Werkbladen - Qlik Sense.gif

The measure will now only show the 24 rolling months (i'm using a flag in my master calendar for this)

Expression: Count({$<IsR24M={1}>}[Order Reference Deliveries])/Count({$<IsR24M={1}>} total <MonthnameYear>[Order Reference Deliveries])

Looks great? Indeed, but here's the new problem.

I really want to use custom colors (that's the reason why I was using the method above)

This is my color expression:

IF(DP_Category = 'Too late', RGB(131,208,245), IF(DP_Category = 'On time', RGB(0,108,183)))

When I add my color expression now, this is the result:

2018-01-03 11_18_04-KPI² v6 - Delivery performance _ Werkbladen - Qlik Sense.gif

On the Y-axis, Qlik Sense is showing more than 24 months.

I did find some similar problems, but no solution:

Qlik Sense color expression issue | Qlik Community

Qlik Sense Color by Expression bug

How to resolve this?


Greetings

Gert