Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can't divide two calculations in chart

This is extremely weird, or maybe I'm just doing something really simple, really wrong.

Here are two charts. One is total orders, one is total orders with a source of PV.

charts.png

Here are the two expressions.

count(distinct(header_uid))

Count({<[orig-source]={'PV'}>}DISTINCT(header_uid))

I want a chart that shows % of PV Orders from Total orders.

Naturally, I use this.

=Count({<[orig-source]={'PV'}>}DISTINCT(header_uid))

/

count({<[orig-source]= >}distinct(header_uid))

But this is my chart...

weird.png

Why?

1 Solution

Accepted Solutions
md_qlikview
Creator II
Creator II

Hi Aaron,

Try below expression -

Count({<[Oring-source]={'PV'}>}Distinct Header_Uid)

/

Count(Total Distinct Header_Uid)

View solution in original post

6 Replies
md_qlikview
Creator II
Creator II

Hi Aaron,

Try below expression -

Count({<[Oring-source]={'PV'}>}Distinct Header_Uid)

/

Count(Total Distinct Header_Uid)

View solution in original post

sonkumamon
Creator
Creator

As Milind wrote, the set analysis in the denominator is useless, because you need to divide in the total count and not the selected count.

sunny_talwar

How about this

=Count({<[orig-source]={'PV'}>} DISTINCT header_uid) / Sum(Aggr(Count({<[orig-source]>} DISTINCT  header_uid), MonthYearField, [orig-source]))

Not applicable
Author

Thanks!

Not applicable
Author

I didn't think of that, thanks

Not applicable
Author

Thanks!