Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We are trying get the Count(partner) based on the condition Joinedpartner>Weekenddate..
We are using the below condition:
Count(if(PartnerJoinDate>=Week_Start_Date__c and PartnerJoinDate<=Week_End_Date__c,Partner_Id__c)) but the values differ from the database query result.
Below are thevalues from database query:
Count |
64 |
127 |
146 |
203 |
286 |
502 |
608 |
690 |
734 |
770 |
823 |
839 |
905 |
below are thevalue from qlikview:
Any ideas?
what result would you expect
what is your requirement?
use distinct if you are getting more than expected value
Count(distinct if(PartnerJoinDate>=Week_Start_Date__c and PartnerJoinDate<=Week_End_Date__c,Partner_Id__c))
hope this helps
ThankYou Sunil for the response.
I am sorry that I haven't explained the issue clearly.
I will Explain it again.
Basically there are 4 tables Week,partner,sales,quarter
sales and partner are related,
sales and quarter are related,
Quarter and Week are related,
Below table is the result from our database for the query
'select count(Id) from partner_c where createddate>=2012-03-31T00:00:00Z and createddate<=2012-04-06T00:00:00Z"
In the query the date 2012-03-31T00:00:00Z is weekstart date and 2012-04-06T00:00:00Z is Weekenddate.
We manually changed the date during the query, bcoz there is no direct relationship btw partner and Week tables
Quarter | Week | End Date | Count |
2012-Q4 | Week 1 | 2012-04-06 | 480 |
3/31/2012 | Week 2 | 2012-04-13 | 951 |
6/29/2012 | Week 3 | 2012-04-20 | 1708 |
Week 4 | 2012-04-27 | 1708 | |
Week 5 | 2012-05-04 | 2389 | |
Week 6 | 2012-05-11 | 2715 | |
Week 7 | 2012-05-18 | 3427 | |
Week 8 | 2012-05-25 | 3953 | |
Week 9 | 2012-06-01 | 4065 | |
Week 10 | 2012-06-08 | 4407 | |
Week 11 | 2012-06-15 | 5073 | |
Week 12 | 2012-06-22 | 5073 | |
Week 13 | 2012-06-29 | 5444 |
Coming to the Qlikview,
In the script level, I loaded Sales,partner,quarterand week tables.
I have taken Week as dimension and the expression for partner is "Count (If(PartnerCreateddate>=Week_Start_Date__c and PartnerCreateddate<=Week_End_Date__c,Partner_Id__c))"
and I am getting the below results:
2012-Q4 | WEEK 01 | 65 |
2012-Q4 | WEEK 02 | 102 |
2012-Q4 | WEEK 03 | 62 |
2012-Q4 | WEEK 05 | 123 |
2012-Q4 | WEEK 06 | 50 |
2012-Q4 | WEEK 07 | 216 |
2012-Q4 | WEEK 08 | 25 |
2012-Q4 | WEEK 10 | 12 |
2012-Q4 | WEEK 11 | 177 |
Is there any solution to the above issue?
Awaiting for your reply.
Thanks,
Bharath Kumar