Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Seperate data with programing

Hi, QV community

I am trying to figure out some problem I need to resolve.

I have two dimensions that is Consol and Job. (See picture, red colour)

Sometimes there is many jobs in one Consol and most often there is only one Job in one Consol.

I need to separate the Jobs when there is many Jobs in one Consol and when there is only one Job in one Consol.

So if I give you an example of what I need. I need Jobs REYE000502, REYE000504, REYE000505 and REYE000506 in one table and REYE000507, REYE000508, REYE000509 and REYE000610 in another table.

I have an indicator that tells me if the Concol has many jobs, that is the HBL_FLAG. (See picture, blue colour)

But the HBL_FLAG does not tell me if a many Jobs have one Consol or not and that is what I need.

Can I do something to make that happen.

QVpic2.JPG.jpg

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Isn't it the other way around? Consol to Job is a possibly 1 to many relationship; At least that's wat the image and the exaplanation say.

How about:

     IF (COUNT(DISTINCT TOTAL <Consol> Job) > 1, 'Y', 'N')

Best,

Peter

View solution in original post

5 Replies
Gysbert_Wassenaar

Try something like: if(count(distinct total <Job> Consol)>1,'Y','N')


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I like your idea but I don't get it right.

I only get N in every line.

Do I need do something different

QV pic3.JPG.jpg

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Isn't it the other way around? Consol to Job is a possibly 1 to many relationship; At least that's wat the image and the exaplanation say.

How about:

     IF (COUNT(DISTINCT TOTAL <Consol> Job) > 1, 'Y', 'N')

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

BTW "...TOTAL <Consol>..." means we'll be ignoring all dimensions except Consol. Selections will still be accounted for.

Peter

er_mohit
Master II
Master II

if(Aggr(NODISTINCT count(Consol),Job)>1,'Y','N')