Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Add two types of percentage calculation together in one measure on a bar chart

Hi

Using Qlik Sense

I am trying to Add two types of percentage calculation together in one measure on a bar chart

The dimension is calendar year

I currently have two percentage measures on the bar chart

the calculations look like

e.g

count({$<SectorID={"1"}, OrderCompleted = {"Yes"}>}SectorID) / count({$<SectorID={"1"}>}SectorID)

but I wish to add / combine this second calculation percentage as one measure on the bar chart

sum({$<SectorID={"20"}>}FinalSaleValue) / sum({$<SectorID={"20"}>}OverallSaleValue)

I have tried with no joy encapsulating the vales

(count({$<SectorID={"1"}, OrderCompleted = {"Yes"}>}SectorID) / count({$<SectorID={"1"}>}SectorID)) +

(sum({$<SectorID={"20"}>}FinalSaleValue) / sum({$<SectorID={"20"}>}OverallSaleValue))

please help

12 Replies
sunny_talwar

If you add them as two different expressions, do you see the bars next to each other?

joeybird
Creator III
Creator III
Author

Hi

when I have two expressions (as two separate measures) I do have two separate bars in the graph

I wish to combine the percentage totals together as one bar in the graph..

the issue I think I can see is one percentage is worked out as count and the other is sum, hence why I have tried encapsulating it..

any ideas please

kind regards


sunny_talwar

I am not sure I am able to understand what you are having. I don't think count % and Sum% should have any problem getting added up. Can you at least share some snapshots where you have both of them as a separate expressions in a bar chart or table?

joeybird
Creator III
Creator III
Author

Hi

that's what I thought , encapsulating always works when doing charts with e.g

(count ({<Country={"USA"}>}ID) / count (ID)) +

(count ({<Country={"Canada"}>}ID) / count (ID))

that's why I think there is an issue with using a count and a sum

please help / ideas

sunny_talwar

please help / ideas

Can try to help if you share a sample. Out of ideas

joeybird
Creator III
Creator III
Author

hi

screenshot.jpg

and my two measures are

Measure one

count({$<SectorID={"1"}, OrderCompleted = {"Yes"}>}SectorID) / count({$<SectorID={"1"}>}SectorID)

Measure two

sum({$<SectorID={"20"}>}FinalSaleValue) / sum({$<SectorID={"20"}>}OverallSaleValue)

I wish to combine measure 1 and 2 in one measure

please help


sunny_talwar

I don't see any bar, do you?

joeybird
Creator III
Creator III
Author

when I do it as separate measures I do

when I try and do this

(count({$<SectorID={"1"}, OrderCompleted = {"Yes"}>}SectorID) / count({$<SectorID={"1"}>}SectorID)) +

(sum({$<SectorID={"20"}>}FinalSaleValue) / sum({$<SectorID={"20"}>}OverallSaleValue))

just gives me the above

please help

sunny_talwar

I don't see it

Capture.PNG