Forum Discussion
Creating a chart with several Columns (values 1, 0) into ONE Single Diagram
desired chart:
I'm seeking any advice on how to make this into a desired single diagram. Are there other Power BI features or data transformations I should consider to visualize the existence of diseases in a single chart?
If you unpivot the disease columns, the data will be easier to visualize. In Power Query, select the disease columns and select Unpivot Columns:
Rename columns as desired:
5 Replies
- DataInsights
Super User
If you unpivot the disease columns, the data will be easier to visualize. In Power Query, select the disease columns and select Unpivot Columns:
Rename columns as desired:
- djankunaFrequent Visitor
Dear DataInsights ,
this worked perfectly, thanks a lot!
In some cases same subject had multiple diseases, so now that I filtered 1 in "disease present", there are multiples the subject records as well (e.g., patient ID = 18 has two lines, one for each of the two diseases). Do you maybe know if there is a way to prevent this duplication, but still showing the disease seperatelly?
As this also duplicates the other parameters the subjects have, that should be displayed one per subject anyway.
thanks a lot!
Dovile
- DataInsights
Super User
- djankunaFrequent Visitor
Hi,
Yes. Unpivot solution created duplicate records in my dataset. Example ID 93, same subject but 2 lines for each of the disease condition:
now for other graphs this information has been displayed several times as well (e.g., gender --> 2x female). So in case i would need to tell how many females are included, this will not be 100 % accurate.
is there any way to show all the results as per ID, but still keep the unpivot for disease column?
93:
regards,
Dovile