top of page

Can you create these patient demographic visuals? | #WOW2024W45 Solution







  • Add a new table element connected to Patients Table

    • For patient count KPI

      • Create a child element visualization

      • Change the visualization type to KPI

      • Put Patient ID in the Value

      • Change aggregation type to Count Distinct

      • Rename the title to Patient Count

    • For average age KPI

      • In the Patients table calculate age

        • DateDiff("year", [Birthdate], Today())

      • Add a child KPI element

      • Put Age in the value

      • Change aggregation type to Average

      • Rename the title to Average Age

    • For Binned Bar Chart

      • Create a slider page control 

        • (I named my Bin-Input)

        • I did min value of 5, max of 15

      • In the Patient Table, create a table summary for the Min Age and Max Age

      • Add a column to put all of the ages in a fixed number of bins

        • BinFixed([Age], [Min of Age], [Max of Age], [Bin-Input])

      • Create a child table of the Patients table

      • Group by the Bins

      • Add columns for the min and max of ages for each grouped bin

      • Concatenate the min and max ages for a label

        • Concat(Text(Min([Age])), "-", Text(Max([Age])))

      • Create a column for the count of patients at the grouped level

      • Create a child bar chart off of this child table

        • (Make sure the bar charge is grouped to the Bin Level)

      • Put Age Ranges on X-Axis

      • Put the count of patients on Y-Axis

      • Change the aggregation to percent of grand total 

        • Set aggregate > Show percent of total > % of grand total

      • Add bar chart labels and remove grid lines

    • For Sankey

      • Add another child visualization (or duplicate the Percent of the patients bar chart)

      • Change the visualization type to Sankey

      • Put Gender and Age Ranges in Stages

      • Put Patient Count in Value

      • Rename title

    • For Percent of Patients by Gender

      • Create a child visualization from the first patient table (not the grouped one)

      • Change orientation to be horizontal

      • Put Gender in Y-Axis

      • Put the count of patients on X-Axis

      • Change the aggregation to percent of grand total 

        • Set aggregate > Show percent of total > % of grand total

      • Rename the title

  • Move everything except the tables to a second or new tab

  • Hide the data tab

  • Add a title text element for “Percent of Patients by Age Ranges” 

  • Create a container with the label, bin slider, and the percent of patients by age range bar chart

  • Arrange everything as seen in the example

  • Match any other formatting or titles

bottom of page