Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem using pick function

Hi,

I tried to use the below said expression using the Synthetic Dimension (%Dual) instead of value list

pick(%Dual,count(DISTINCT {< ForActiveCustomerMonth=, ForActiveCustomerMonthYear=, ForActiveCustomerYear=, MonthEndDate=>}

if(aggr(vInputDate-max(CustMaxDate)>=0 and vInputDate-max(CustMaxDate)<=365,user_id_A, MonthEndDate),user_id_A)),

count(DISTINCT {< ForActiveCustomerMonth=, ForActiveCustomerMonthYear=, ForActiveCustomerYear=, MonthEndDate=>}

if(aggr(vInputDate1-max(CustMaxDate)>=0 and vInputDate1-max(CustMaxDate)<=365,user_id_A, MonthEndDate),user_id_A)))

Variable InputDate = Monthend Date provided by the client in 'YYYY-MM-DD' format (eg. 2016-03-31)

Variable InputDate1 = Previous monthend date for the client provided (eg. 2016-02-29)

But, am finding that, the first expression works, but the second expression is not working in the table.

I cross-checked the same individually using text object & both the expressions are working fine.

Can anyone help me out on this issue.

Thanks in advance,

Regards,

Anand B Nagaraj

9 Replies
Gysbert_Wassenaar

Please post a small qlikview document that demonstrates the problem.


talk is cheap, supply exceeds demand
sunny_talwar

What about this may be?

Count(DISTINCT {< ForActiveCustomerMonth=, ForActiveCustomerMonthYear=, ForActiveCustomerYear=, MonthEndDate=>} If(Aggr(NODISTINCT vInputDate1-max(CustMaxDate)>=0 and vInputDate1-max(CustMaxDate)<=365, user_id_A, MonthEndDate), user_id_A)))

Anonymous
Not applicable
Author

Hi ,

can I use pick /match function for the below

if(PG='MS' or PG='P others'or PG='NLE' or PG='PECE' or PG='HCE',dual('Others',26),

if(PG='CPS',dual('CPS',12),if(PG='PCS',dual('PCS',10),if(PG='PSSEU',dual('PSSEU',13),if(PG='ALL'or PG='',null(),PG))))) as Prod_Group

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes you can. But an applymap() would be even better, I think.

Anonymous
Not applicable
Author

Hi ,

can I use pick /match function for the below

if(PG='MS' or PG='P others'or PG='NLE' or PG='PECE' or PG='HCE',dual('Others',26),

if(PG='CPS',dual('CPS',12),if(PG='PCS',dual('PCS',10),if(PG='PSSEU',dual('PSSEU',13),if(PG='ALL'or PG='',null(),PG))))) as Prod_Group

Anonymous
Not applicable
Author

Hi Peter,

Can u share your idea  how can u write applymap() there?

Regards

pavan

rupamjyotidas
Specialist
Specialist

Use something like this

if(WildMatch(PG,'MS','*others*','NLE','PECE','HCE')>0,Dual('Others',26),....) as Prod_Group

Note: Equation is not complete

dunnalahk123
Creator III
Creator III

Hi Sunny,

I have a question regarding pick function.

when i selection one of my dimension pick function is not working as expected, could you help me with that.

sunny_talwar

Where are you using your expression and what is the expression?