Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MVP & Luminary
MVP & Luminary

I believe it would be:


Count(DISTINCT {

(

< [LOCATION] = { 'SFDC' } >

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

)

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

} [URL] ) ) )


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

6 Replies
MVP & Luminary
MVP & Luminary

I believe it would be:


Count(DISTINCT {

(

< [LOCATION] = { 'SFDC' } >

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

)

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

} [URL] ) ) )


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

Master III
Master III

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

Creator
Creator

Hello Meghann,

Try this,

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



Hope this helps!

Champion II
Champion II

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

Hello,

Where would I put the concat function?

Thank you

Master III
Master III

If You want to know which URLs are.