Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed with evaluating an expression

Hi All,

I want to key in an expression which would return the count of distinct attributes from one column based on the values of another column. Please find the following table and further illustration of this requirement :

Task IDTransition InTaskTransition Out
10557115ProofR&DBuild
10557115ProofR&DBuild
10557115ProofR&DBuild
10557115ProofR&DBuild
10557115ProofR&DBuild
10557115HoldR&DBuild
10557115HoldR&DBuild
10557115HoldR&DBuild
10557115HoldR&DBuild
10557115HoldR&DBuild
10653829ReviewR&DBuild
11562281ReviewR&DBuild
11562281ReviewR&DEB
11562281ReviewR&DEB
12594118ReviewR&DEB
15423802ProofR&DBuild
15423802ProofR&DBuild
15423802ProofR&DEB
15423802ReviewR&DEB
15423802ReviewR&DEB
15423802ReviewR&DEB
15423802ReviewR&DBuild

From the above table i want to calculate the count(number of times) a distinct task is in one transition state. For example: I want to calculate the number of times 10557115 task is having Proof in "Transition in" column. (It would be really helpful if you could further expand the expression to include values from multiple column. I want to use this expression in a Table object. Any help is much appreciated.

Thanks & Regards,

Abhinay.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     have a look at the attachment.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached example


talk is cheap, supply exceeds demand
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     have a look at the attachment.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

You want to count the distinct ID with respect to trasition In then you have to use aggr function for that.

Try this.

Aggr(Count(Distinct TaskID),Transition In)

Regards,

Nirav Bhimani

Not applicable
Author

Hi All,

Thanks for your timely reply. Just a small addition to my above request : What needs to be done at the report level itself if i want to have an extra column "Count" which increments itself when a task visits the same transition again, please find the following Table :

Task IDTransition InTaskTransition OutCount
10557115ProofR&DBuild1
10557115ProofR&DBuild2
10557115ProofR&DBuild3
10557115ProofR&DBuild4
10557115ProofR&DBuild5
10557115HoldR&DBuild1
10557115HoldR&DBuild2
10557115HoldR&DBuild3
10557115HoldR&DBuild4
10557115HoldR&DBuild5
10653829ReviewR&DBuild1
11562281ReviewR&DBuild1
11562281ReviewR&DEB2
11562281ReviewR&DEB3
12594118ReviewR&DEB1
15423802ProofR&DBuild1
15423802ProofR&DBuild2
15423802ProofR&DEB3
15423802ReviewR&DEB1
15423802ReviewR&DEB2
15423802ReviewR&DEB3
15423802ReviewR&DBuild4

should this be achieved at script level/report level, if so can you guys help me with the expression.

I think we should write and iteration statement if we have to handle this at script level.

Sorry, should have been more clear with my communication.

Thanks & Regards,

Abhinay.

Not applicable
Author

Hi All,

Thanks for your timely reply. Just a small addition to my above request : What needs to be done at the report level itself if i want to have an extra column "Count" which increments itself when a task visits the same transition again, please find the following Table :

Task IDTransition InTaskTransition OutCount
10557115ProofR&DBuild1
10557115ProofR&DBuild2
10557115ProofR&DBuild3
10557115ProofR&DBuild4
10557115ProofR&DBuild5
10557115HoldR&DBuild1
10557115HoldR&DBuild2
10557115HoldR&DBuild3
10557115HoldR&DBuild4
10557115HoldR&DBuild5
10653829ReviewR&DBuild1
11562281ReviewR&DBuild1
11562281ReviewR&DEB2
11562281ReviewR&DEB3
12594118ReviewR&DEB1
15423802ProofR&DBuild1
15423802ProofR&DBuild2
15423802ProofR&DEB3
15423802ReviewR&DEB1
15423802ReviewR&DEB2
15423802ReviewR&DEB3
15423802ReviewR&DBuild4

should this be achieved at script level/report level, if so can you guys help me with the expression.

I think we should write and iteration statement if we have to handle this at script level.

Sorry, should have been more clear with my communication.

Thanks & Regards,

Abhinay.

Not applicable
Author

Hi Gysbert,

Thanks for the reply. Could you please repost the expression you have given in my other discussion : http://community.qlik.com/thread/80218?tstart=0 .....i think you may have deleted it by mistake....your help in this regard is much appreciated.

Thanks,

Abhinay.