Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Display in Straight table based on condition data

Hi,

I have a table with two fields like this:

Table1:

    ID, Status

    1, pass

    2, fail

    3, pass

    1, fail

    1, fail

    2,pass

    3,pass

- Now i will take straight table with ID.

- In the expression i want to write like this if the status is fail for any particular ID i want to display as fail under status.

i.e in the above data for id=1 there are 2 status(2 fails,1 pass) so i need to get fail under status.

For example i want to display in straight table like this:

     ID     Status

     1       Fail

     2       Fail

     3       pass

how can i do this

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Create a Straight table.

    Add dimension as ID

    and Expression as

    if(count({<Status = {"fail"}>}ID)>=count({<Status = {"pass"}>}ID),'Fail','Pass')

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

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Create a Straight table.

    Add dimension as ID

    and Expression as

    if(count({<Status = {"fail"}>}ID)>=count({<Status = {"pass"}>}ID),'Fail','Pass')

Regards,

Kaushik Solanki

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

Thanks kaushik..