Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_Brunner
Creator
Creator

Count with Set Analysis per Month

Hi Guys,

I am trying to Count number of    New Customers Accounts, Per REP per MONTH,  .

I am only selecting different MONTHS from List box as the rest is Set analysis.

I am missing something here as I can only can get an aggerated amount of New Customers per REP up to MONTH Selected ?

I have a table  with =   NewCustDate,  Rep, CustomerNo, CustStat

the NewCustDate , Date format =YYYYMMDD and  Data Starting from 20120701

My Expression 

Count({$<Rep={'HARRY'},CustStat={'20'}>}CustStat)

  I have tried this Expression as well but give same results as above

Count ({$<CustomerNo=p({$<Rep={'HARRY}>}CustomerNo)>}Month(NewCustDate)

any help appreciated

regards Peter

1 Solution

Accepted Solutions
Peter_Brunner
Creator
Creator
Author

Hi Som,

after reading your reply I went through my script again and found an error in my linked table for the Customers month field

I fixed this so "Month" format matches in both tables and now it selects correctly

Thanks for your help Som

And thanks to all for their suggestions and sorry for only giving you guys half a picture

it now works with the my original

Count({$<Rep={'HARRY'},CustStat={'20'}>}CustStat)

regards Peter

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Have you tried this?

Count({$<Rep={'HARRY'},CustStat={'20'}>} Distinct CustomerNo)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Peter_Brunner
Creator
Creator
Author

Hi Jonathan,

Thanks for your reply Yes I  ahve tried that one and same result it counts YTD not MTD

Peter

somenathroy
Creator III
Creator III

Can you pls upload sample qvw application. From which field or calculated dimention are you selecting month?

Regards,

Som

Not applicable

Count({$<Rep={"HARRY"},CustStat={"20"}>} Distinct CustomerNo)

renjithpl
Specialist
Specialist

I am not sure, but can use the below lint to get some idea,

http://community.qlik.com/message/252665#252665

Peter_Brunner
Creator
Creator
Author

Hi Som,

after reading your reply I went through my script again and found an error in my linked table for the Customers month field

I fixed this so "Month" format matches in both tables and now it selects correctly

Thanks for your help Som

And thanks to all for their suggestions and sorry for only giving you guys half a picture

it now works with the my original

Count({$<Rep={'HARRY'},CustStat={'20'}>}CustStat)

regards Peter