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: 
lalitkgehlot89
Creator II
Creator II

Need logic help on section.

Hi,

In given data I want to see only CUSTACCOUNT which has the TYPE only Internal on selection.

Please help me out to write the logic.

17 Replies
lalitkgehlot89
Creator II
Creator II
Author

Here we can create new field with the value like.

Only Internal
Only Former
Only External
Only Miscellaneous
antoniotiman
Master III
Master III

Hi Lalit,

try this

Dimension CUSTACCOUNT

Expression

Only({<CUSTACCOUNT={"=Count({<TYPE>} DISTINCT TYPE)=1"}>} TYPE)

Regards,

Antonio

its_anandrjs

In your Excel file there is field TYPE with values Internal, Former, External, Miscellaneous if you select one of this you get the corresponding CUSTACCOUNT and if you have any more field you can filter this CUSTACCOUNT.

What is your requirement?

effinty2112
Master
Master

Hi Latit,

You could try a listbox with this expression:

=Aggr(If(Count(DISTINCT TYPE) = 1,TYPE,'Multiple types'), CUSTACCOUNT)

Regards

Andrew

lalitkgehlot89
Creator II
Creator II
Author

At any end either Script or Front End, which is easy.

Anil_Babu_Samineni

Can you look other response Antonio / Andrew too? then come back to thread we will help for sure

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
antoniotiman
Master III
Master III

Or,

if You want Always TYPE = only 'Internal', try this

Only({<TYPE={'Internal'},CUSTACCOUNT={"=Count({<TYPE>} DISTINCT TYPE)=1"}>} TYPE)

sumeet-vaidya
Partner - Creator
Partner - Creator

Hi Lalit,

Try below in your script.

Temp1:

Load

     CUSTACCOUNT,

     TYPE

Resident Main_Table

Where Match(TYPE, 'Internal');


NoConcatenate


Temp2:

Load

     CUSTACCOUNT,

     CUSTACCOUNT AS CUSTACCOUNT_Key,

     TYPE

Resident Main_Table

Where Not Match(TYPE, 'Internal');


NoConcatenate


Temp_Final:

Load

     CUSTACCOUNT,

     TYPE

Resident Temp1

Where Not Exists(CUSTACCOUNT_Key,CUSTACCOUNT);


Drop Tables Temp1, Temp2;



Regards,

Sumeet Vaidya