Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

Hi Friends

I have two fields CustID, CustDetails. I straight table it has millions of records. Please give me a expression, If i enter the CustID, I have to get CustDetails  in a inputbox.

6 Replies
avinashelite

Did not get your requirement !! then you select the CustID then it should display the result with the values in the input box ?

if that is the case >Chart Properties >General > Calculated Condition>getselectedcount(CustID )>0

then create a variable for the  CustDetails and then place this

maxstring({<CustID ={"=getfieldselections(CustID,',')"}>}CustDetails  )

Not applicable

Could you please elaborate bit more ..

As per my understanding if u enter custid=1 then chart should show the data for only custid =1  else for all cust Ids

if this is ur requirement  then

create  a variable   vvalue = getfieldselections(custid)

and in ur chart dimension will be

if (getselectedcount(custid)>0,'$(vvalue)',custid)

expression is :

=CustDetails 

awhitfield
Partner - Champion
Partner - Champion

Why not just use a search object linked to the custid field?

Kohli
Creator II
Creator II
Author

Yes Manoj,

If i enter CustomerID=1, I need to show only CustDetails=1

Anil_Babu_Samineni

May be use

If(GetSelectedCount(CustomerID) > 0, Count(CustDetails))

It will give output as If User selects CustomerID >0 (That means Starts from 1) then Count will give depends on Associative to CustDetails from CustomerID.

It you need unique counts of Details then you may use DISTINCT over like below

If(GetSelectedCount(CustomerID) > 0, Count(DISTINCT CustDetails))

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
Not applicable

Create One Variable

let say     vDel   in variable overview.

write this one as dimension in ur chart and   ur expression will be  count(CustDetails)( as per ur data )

if('$(vDel)'=CustomerID,CustomerID)

if u have string in ur      "CustomerID" then maintain single quotes for variable

I tried this, its working fine