Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kmstephenson
Creator
Creator

single bar chart to include bars of multiple indicator variables

I have a wide dataset that includes many chronic condition indicators, and I want to see all of these on the same bar chart.

For example:

Patient_ID        Start_Dt          End_Dt            chf_ind    copd_ind     diabetes_ind        ckd_ind     ..... etc

        1                 1/1/2012      12/31/2012            1             0                        0                         0

        2                 1/1/2012      12/31/2012            0             0                        1                         1

        3                 1/1/2012      12/31/2012            1             1                        1                         1

What I did is keep this dataset with all indicator variables as the fact table and then transposed the data into 1 row per patient per time frame per condition (indicator variable=1).

For, example:

Patient_ID      Start_Dt          End_Dt           condition

        1             1/1/2012        12/31/2012          CHF

        2             1/1/2012         12/31/2012         DIABETES

        2             1/1/2012         12/31/2012         CKD

        3             1/1/2012         12/31/2012         CHF

        3             1/1/2012         12/31/2012         COPD

        3             1/1/2012         12/31/2012         DIABETES

I used the transposed variable condition for the bar chart to be able to see in descending order the frequency of conditions. However, if I select any condition within the bar chart, it does not show me what other conditions these patients have. For example, I want to be able to select the CHF bar and see that of patients with CHF, the other coexisting conditions they have are COPD and DIABETES. I had to create listboxes and buttons to select the indicator variable from the fact table to update the bar chart with this information.

Do you have any recommendations for another way of doing this? Where you have a number of indicator variables that you want to see on the same chart like this?

Thank you!

11 Replies
kmstephenson
Creator
Creator
Author

Hi Mark,

This works but only if you use the list box to choose the condition. Ideally, we would like to be able to select any condition in the bar chart for condition type1 (we have between 20 and 70 conditions for each condition type) and have the bar chart update to all comorbid conditions for the condition selected (versus having to use a list box to select the conditions). Is this an easy fix?

Thanks!

mark_casselman
Creator
Creator

Hi KM,

Took some time, but can be solved with 'alternate states' instead of data islands.

See attached updated file. Select a condition form the cycle groups and see aal comorbid conditions.

To avoid confusion for the enduser the selected conditions is highlighted and the title of the comorbid conditions is generated.

Mark