Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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
Contributor II

Re: Can't divide two calculations in chart

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
Contributor II

Re: Can't divide two calculations in chart

Hi Aaron,

Try below expression -

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

/

Count(Total Distinct Header_Uid)

View solution in original post

sonkumamon
New Contributor III

Re: Can't divide two calculations in chart

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.

Re: Can't divide two calculations in chart

How about this

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

Not applicable

Re: Can't divide two calculations in chart

Thanks!

Not applicable

Re: Can't divide two calculations in chart

I didn't think of that, thanks

Not applicable

Re: Can't divide two calculations in chart

Thanks!