Forum Discussion
Hospital Data Question - NEED HELP ASAP
- Anonymous5 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
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
Thank you!! I used the filters before but wasn't sure if there was a way to also remove it from the Excel sheet without ruining how the data is displayed in Power BI.
Is there a way to change the order of a category on a chart?
Example, on the Axis portion of the chart, the Outcome list Major, Mild and Moderate events. It is listing them in alphabetical order but I would like it to be listed as Mild, Moderate and Major. Can that be changed?
Thanks again for any assistance!
You have to have a numeric column that defines the sort order you want to use then in your model you set the sort order of the category column by the category_sort column. Here is an article about the subject.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column