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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
kaushiknsolanki
MVP
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
MVP
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..