Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

calculation distinct

Hi

How to count the number of ranches in which there document.2 ?

Thank you

1 Solution

Accepted Solutions
sasikanth
Valued Contributor III

Re: calculation distinct

hi

Try this expression

= count(DISTINCT aggr(count( if(document<>'document2', branch)),branch))

removed DISTINCT inside aggr, just try it.

Pls. see attachement

13 Replies

Re: calculation distinct

A Straight Table with :

  • Dimension    document
  • Expression  = Count (  distinct branch )


Will give the count of ranches for each document.

You can select document2 if that is the only one you wish to see.

Partner
Partner

Re: calculation distinct

Hi Marina,

see the additional table in the attached.

HTH

Andy

Not applicable

Re: calculation distinct

It is not exactlyScreenshot_1.png

HirisH_V7
Honored Contributor

Re: calculation distinct

Hi,

May be like this,

Dimension:

branch

Expression:

=Count(DISTINCT{<document={'document2'}>}document)

Distinct-205167.PNG

Hope this helps,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Not applicable

Re: calculation distinct



I'm looking for the number of branches that do not have a document 2

Not applicable

Re: calculation distinct

Screenshot_2.png

HirisH_V7
Honored Contributor

Re: calculation distinct

Hi,

Check this,

Can you explain a bit more ! Your output required.

PFA

Hirish

HirisH
“Aspire to Inspire before we Expire!”
sasikanth
Valued Contributor III

Re: calculation distinct

HI,

try this Expression for Branches that do not have Document 2

= count(DISTINCT aggr(count(DISTINCT if(document<>'document2', branch)),branch))

Please find the attachment

Partner
Partner

Re: calculation distinct

Ha, that's not what you asked for though