Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Hospital Data Question - NEED HELP ASAP

Hello,   I am trying to figure out how to make it so that the fields that state "No Injury Reported" and slots that are completely blank don't show up in the charts and tables that I create in Powe...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    According to my understand , you want to remove the rows when the Outcome is blank or =No Injury Reported and then sort by severity of injury, right?

    You could use the following to create a new table:

     

    Table 2 =
    ADDCOLUMNS (
        FILTER (
            'Table',
            'Table'[OUTCOME] <> "No Injury Reported"
                && 'Table'[OUTCOME] <> BLANK ()
        ),
        "Flag", SWITCH ( [OUTCOME], "Mild / Minor Injury", 1, "Moderate ", 2, "Major", 3 )
    )

     

     

    Then sort the Outcome column by Flag column

     

    Here is the pbix file.


    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,
    Eyelyn Qin