Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
alvinford
Contributor III
Contributor III

Facing Challange

I am facing the following challenge.

Have the following columns Year Of Purchase, Code1, Code2, Code3, Sold Date. From the Year Of Purchase 2004/2005 there are two sold Date .Please find the attachment for reference.

From the above columns I have to derive a new column YearofSoldDate with the values Year1 and Year2 which will look similar to this .(Please find the attachment for reference)

When I select Year1 from the YearOfSoldDate '10/10/2005' should be highlighted and

when I select Year2 from YearOfSoldDate '19/05/2006' should be highlighted.

How to achieve this , request your help..

Thanks in Advance..

Regards,

Alvin.

8 Replies
alvinford
Contributor III
Contributor III
Author

For Your reference I have attcahed the diagramatic format how it looks like .

Regards,

Alvin.

Not applicable

Hi alvin,

Check the attached app and tell if this answers your requirement .

Regards,

-Karthik

alvinford
Contributor III
Contributor III
Author

Hi Karthik, Thanks for your reply...You have done perfectly for one Year ,But I want for all the Years...I have attached the example for your reference.

Might be in my post it is not clear for you. You provided solution for only one Year .. actually the sequence will be repeating i.e if I select 2005/2006 I have two dates in Sold Date (19/5/2006,9/7/2007) and If I select 2006/2007 i have two dates in sold Date (9/7/2007,16/6/2008) and so on..When ever I select the Year from Year of Purchase Two dates from solddate are highlighted. I have to consider The first date in the SoldDate as Year1 and the Second Date in the SoldDate as Year2.Hope you understood my requirement.

Regards,Alvin

Not applicable

Hi Alvin,

Check the attached file and revert if the script solves now or not.

Regards,

-Karthik

alvinford
Contributor III
Contributor III
Author

Hi Karthik,

Very Thanks for your reply . The logic is correct for selecting the Year but still facing some issue on the data.

I am just using this for formula for data validation Count(distinct Code3).

When I select the Year of Purchase as '2006/2007' two years are highlighted in the SoldYear i.e. 2007 and 2008. When I select 2007 the value of Count(distinct Code3) is 26 . So, when I select the Year1 also the value should be 26 but it is giving the value as 1. For the Year2 it is displaying the values correctly . There is a issue when I select the Year1.

Hope you will give one more try and help me to solve this issue.

Regards,
Alvin.

alvinford
Contributor III
Contributor III
Author

Can any one help me on this.....

Regards,

Alvin.

Not applicable

Hi alvin,

sorry couldn't check the forum for sometime...

pls check the attached and tell if this is correct.

Regards,

-Karthik

alvinford
Contributor III
Contributor III
Author

Hi Karthik,

Thanks for your continous efforts .. One sad thing is still I am facing some issue with the Data . Now I have attached a QVD . The output is same as discussed , only thing is I have added new columns Visted_Count, Purchased count. Take the expression as Sum(Visted_Count) and check the values . As I found much difference when selected thedate and Year(from the derived column) I am requesting you to check..

Regards,

Alvin.