Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

Logic Help

HI ,

I need logic help on one thing..

I have data as below

Table1

BID LID

1     23

1     24

2     25

2     26

3     24

How can I get the LID count on each building

Thank s much

11 Replies
vishsaggi
Champion III
Champion III

What is the issue you are facing? Count(LID) does not work ? Where are you displaying this data?

johnca
Specialist
Specialist

Maybe like this?

Table1:

Load BID,

     Sum(LID) as LID_SUM

     Group By BID;

Load * Inline [ BID, LID

1, 23

1, 24

2, 25

2, 26

3, 24

];

This will results in a simple table with BID 1 = 47, BID 2 = 51 and BID 3 = 24;

BIDLID
147
251
324
eduardo_dimperio
Specialist II
Specialist II

Could you please put some output example, to better understand?

Anil_Babu_Samineni

I think, This will deserve.

Count(TOTAL <LID> BID)

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
sasikanth
Master
Master

Try this,

Sum(Total <BID> LID)


chinnuchinni
Creator III
Creator III

hi ,

try this:

load * inline [

BID, LID


1,     23


1,     24


2,     25


2,     26


3 ,    24



];



logic.PNG

shiveshsingh
Master
Master

Can you try this?

=Sum(Total <BID> LID)

Anil_Babu_Samineni

I apologies guys for telling this (Because, I really not digesting for this )

My reply is May 23, 2018 11:22 PM

shiveshsingh‌ (Replied around -- 5:11 AM)

sasikanth_narne  (Replied around -- May 24, 2018 12:18 AM)


Note - If we still looking the community, Because there might be another solution (Approaches should differ) rather simply doing same expression posting then we will learn do this, Instead - If you like from some one answer is same for another you can like it

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
shiveshsingh
Master
Master

Hi Anil,

I thought the expression that you shared (Count(TOTAL <LID> BID)) would not give correct result, It should be Count(TOTAL <BID> LID)) to get the count of LID