Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

gregoryt40
New Contributor

Comparing two fields using selection box

Hello,

I am aiming to compare columns of data using a selection box to see if the fields have changed.  I want 5 years (e.g. 2010, 2011, 2012, 2013 and 2014) of fields and want the user to compare any two fields to see if a record changed between them.

Could someone please help me with the syntax for such a selection box.

Thank you.

7 Replies
sumitjadhav
Contributor II

Re: Comparing two fields using selection box

hello tyler Gregory,

       I didnt understood ,what you exactly want ,pleaase explain it in brief with some data.

vishsaggi
Esteemed Contributor III

Re: Comparing two fields using selection box

Hello Tyler,

I believe you are looking for Alternate State analysis here for comparing the values.
Can you explain little more or attach some sample data or output for further help.

Thanks,
V.

balrajahlawat
Esteemed Contributor

Re: Comparing two fields using selection box

When It comes to Compare..

Alternate states are the best option. You can create two states & keep the object as per your requirement into state.

jafari_ervin
Contributor III

Re: Comparing two fields using selection box

you should create two list box with two different state

Create Alternate state from Setting ->Document Properties -> General Tab

and set state from object general tab.

gregoryt40
New Contributor

Re: Comparing two fields using selection box

Hi,

That is exactly what I want to do.  Here is an example:

                                Date # 1      Date # 2

Free Shipping Flag         Y                 N

I want to have list boxes for the fields 'Date #1' and 'Date #2' above so that the user can select the dates they want to compare.

If the field changed from one date to another, I want the latest record to be displayed. 

I want to exclude all records that have an entry in one data set but not the other (i.e. if a product was not around for Date #1 but was added in date #2, I do not want this to be displayed).  I only want it to display a change if the record was present in both data sets.

Please let me know your thoughts.


Thank you!


Tyler

miguelbraga
Valued Contributor III

Re: Comparing two fields using selection box

Hi Tyler,

Can you kindly share a qvw sample so that we can solve your problem? Or can share a excel or csv file with your dates?

Regards,

MB

gregoryt40
New Contributor

Re: Comparing two fields using selection box

I have included an Excel file below that displays a sample input file and the output I am trying to achieve. 

Please let me know if you are able to help or if you have further questions.


Thank you!

Community Browser