Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

to compare fields

I want to display the agent field for transactions for this year and previous year.

How can I solve this?

16 Replies
DavidFoster1
Specialist
Specialist

That makes a bit more sense.

So your table would have the columns

CLIENT

AGENT

AGENT LAST YEAR

And the only connection in your data from CLIENT to AGENT is through transactions.

I think you are going to have to make the assumption that the AGENT field is the most common agent from transactions in the current year selected and the AGENT LAST YEAR field is the most common agent from transactions in the previous year.

something like (I have not tested these):

AGENT = firstsortedvalue(AGENT, COUNT(AGENT))

AGENT LAST YEAR = firstsortedvalue({<YEAR={"YEAR-1"}>} AGENT, COUNT(AGENT))

mangalsk
Creator III
Creator III

Hello,

PFA

Hope it works

Not applicable
Author

but te year is according to my selection so i cannot use yearnow

mangalsk
Creator III
Creator III

Hello,

try this for agent acc to year selction:

Create variable vCur=max(year1)

In list box write expression==if(year1=$(vCur),agent)

By default it will show current year agent but acc to year selection it changes

mangalsk
Creator III
Creator III

Hello,

PFA

I have updated qvw acc to your requirement.

Please check it.

Not applicable
Author

still no result as when i choose a particular agent , the agent of that year is filled but that of the previous year is left null if it is different

mangalsk
Creator III
Creator III

Hello,

You can use alternate state.

Create two alternate states in Document properties and use in list box

alt.png

alter.pngalt1.png