Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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?
Solved! Go to Solution.
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:
Proud to be a Super User!
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
Would you be able to provide the expected result for the scenarios you mentioned?
Proud to be a Super User!
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
You could create a measure using DISTINCTCOUNT like this:
Count Subject = DISTINCTCOUNT ( 'Table'[Subject] )
Proud to be a 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:
Proud to be a Super User!
User | Count |
---|---|
98 | |
90 | |
82 | |
70 | |
67 |
User | Count |
---|---|
115 | |
104 | |
101 | |
72 | |
64 |