Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Inclusive Count Function

Hi all,

I am trying to format a gauge to count all URL's that have a Location = SFDC AND a Location = Qlik.com. I cannot get my function to work as I don't know the proper formatting. So far, I have

=Count(DISTINCT {< [LOCATION] = { 'SFDC','Qlik.com' } , [Language] = { 'English' }, Format -= {'A4'} >} [URL] ) ) )

that I know works, but includes all assets categorized as SFDC or Qlik.com, not only those that are both.

Thanks!

1 Solution

Accepted Solutions

Re: Inclusive Count Function

I believe it would be:


Count(DISTINCT {

(

< [LOCATION] = { 'SFDC' } >

* < [LOCATION] = { 'Qlik.com' } >

)

* < [Language] = { 'English' }, Format -= {'A4'} >

} [URL] ) ) )


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

6 Replies

Re: Inclusive Count Function

I believe it would be:


Count(DISTINCT {

(

< [LOCATION] = { 'SFDC' } >

* < [LOCATION] = { 'Qlik.com' } >

)

* < [Language] = { 'English' }, Format -= {'A4'} >

} [URL] ) ) )


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

antoniotiman
Honored Contributor III

Re: Inclusive Count Function

Hi Meghann,

try like this

Count({<URL=P({<LOCATION={'SFDC'}>})*P({<LOCATION={'Qlik.Com'}>}),Language={'English'},Format-={'A4'}>} DISTINCT URL)

and

Concat({<URL=P({<LOCATION={'SFDC'}>})*P({<LOCATION={'Qlik.Com'}>}),Language={'English'},Format-={'A4'}>} DISTINCT URL,' - ')

Regards,

Antonio

rohitraut
Contributor

Re: Inclusive Count Function

Hello Meghann,

Try this,

=Count(DISTINCT {< [LOCATION] = { 'SFDC*','Qlik.com*' } , [Language] = { 'English' }, Format -= {'A4'} >} [URL] ) ) )



Hope this helps!

vinieme12
Esteemed Contributor II

Re: Inclusive Count Function

Hi Meghann,

The below translates to

  LOCATION = SFDC OR Qlik.com

[LOCATION] = { 'SFDC','Qlik.com' }

To have the AND condition you will need  *  operator which will look for intersecting records between the two sets

https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/

Not applicable

Re: Inclusive Count Function

Hello,

Where would I put the concat function?

Thank you

antoniotiman
Honored Contributor III

Re: Inclusive Count Function

If You want to know which URLs are.