2

I'm have a simple question in QlikSense. I have a data set about website views from various IPs of all over the world, but want to see the output of unique IPs; not all IPs. should I use any functions? If not, so how can I do that one? I'll be happy if you help me. So thanks for your cooperation again.

Mobin
  • 31
  • 1

2 Answers2

2

Try Count(distinct [IP]) -distinct is for unique values

alf.cz
  • 59
  • 6
0

If you add IP as a dimension, Qlik Sense will automatically show only distinct values.

However, I recently did something with referring URLs and found I had to do a bit of data cleansing before I could make sense of it. This code might help.

UrlPartsRaw:
lOAD [Page Url]
    ,SubField([Page Url],'/',ITERNO()) AS UrlComponent

    ,ITERNO() as UrlComponentIterNo
RESIDENT WebpageDetailActivity
WHILE(ITERNO()<=SubStringCount([Page Url],'/')+1);

Map_URLClean:
Mapping Load * INLINE [ 
char replace
.com.
.com
.ca
.co.uk
.co
.fr
.jp
.local
.org
.cn
.net
.ru
fanyi.
translate.
webcache.
web.] (delimiter is ' ');

WebParts:
lOAD [Page Url]
    ,MapSubString('Map_URLClean',UrlComponent) as UrlComponent
    ,Replace([Page Url],UrlComponent,'') as UrlPart
RESIDENT UrlPartsRaw
where UrlComponent<>'' and not(isnull(UrlComponent))
and UrlComponentIterNo=1;
Chris J
  • 938
  • 1
  • 8
  • 27
  • you can use `MapSubString` function to get rid of the `Replace`. Its going to be much easier to maintain :) https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/MappingFunctions/MapSubstring.htm – Stefan Stoichev Oct 17 '16 at 18:38