Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text and image objects

Hi all,

I need some data in object and image object. I have added sample .xls of the columns.

In load script i am using the below code:

LOAD `subject_id` as Order_selected,

    count(subject_status= "passed" && subject_status= "completed") as count_completed,

    count(subject_status= "incomplete") as count_incompleted  ;

SQL SELECT `subject_id`,

    `user_id`,

    `subject_status`

FROM rcdbrpt.subjectaccesstracking

group by user_id ;

What actually i need is :

For example in .xls file i have a user id 18.

1 .order_selected -----  i.e in subject_id user 18 as subject order 1,2,3,4.

2. count of subject_status where subject_status= "passed" && subject_status= "completed" as count_completed

3. count of subject_status where subject_status= "incomplete" as count_incompleted

These data should be grouped according to user_ id.

In filter pane if i select user_id = 18. the output should be:

Course Selection Order           : 1,2,3,4

Number Completed                 : 3

Number Partially Completed     : 1

Please help me to solve this.

Thanks,

Pramod

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Here is the expression you should use in text box.

='Course Selection Order : ' & Concat(DISTINCT subject_id) & chr(10) & 'Number Completed : ' & count({<subject_status = {"Passed","Completed"}>}DISTINCT subject_id)& chr(10)

& ' Partially Completed : ' & count({<subject_status = {"inComplete"}>}DISTINCT subject_id)& chr(10)

Regards,

Kaushik Solanki

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

Hi Kaushik Solanki,

Everything looks fine except one thing. the selection order is not as in the database.

for example: for id= 82

Course Selection Order           : 1,4,3,2


But it is displaying in the order : 1,2,3,4


For all data it is displaying in the same order.


Please help on this.


Thanks,

Pramod

Not applicable
Author

Hi,

I found it the problem is i want to group it by user_id.  I'm not getting how to group it.

the code i used.

Concat(DISTINCT subject_id, '-', subject_access_track_id) & chr(10) &

the order what i need is getting when i select the particular user_id,  but the problem is when i dint select any id,

it is displaying all the values.

Please help on it.

Thanks,

Pramod