Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculation distinct

Hi

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

Thank you

1 Solution

Accepted Solutions
sasikanth
Master
Master

hi

Try this expression

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

removed DISTINCT inside aggr, just try it.

Pls. see attachement

View solution in original post

13 Replies
Anonymous
Not applicable
Author

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.

awhitfield
Partner - Champion
Partner - Champion

Hi Marina,

see the additional table in the attached.

HTH

Andy

Not applicable
Author

It is not exactlyScreenshot_1.png

HirisH_V7
Master
Master

Hi,

May be like this,

Dimension:

branch

Expression:

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

Distinct-205167.PNG

Hope this helps,

PFA,

Hirish

HirisH
Not applicable
Author



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

Not applicable
Author

Screenshot_2.png

HirisH_V7
Master
Master

Hi,

Check this,

Can you explain a bit more ! Your output required.

PFA

Hirish

HirisH
sasikanth
Master
Master

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

awhitfield
Partner - Champion
Partner - Champion

Ha, that's not what you asked for though