Forum Discussion
djankuna
2 years agoFrequent Visitor
Creating a chart with several Columns (values 1, 0) into ONE Single Diagram
Hello all, I am seeking help with a Power BI issue I'm facing. I am working on a dataset where I have several separate columns representing the presence of different diseases (1 = disease presen...
- 2 years ago
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:
DataInsights
Super User
2 years agodjankuna
2 years agoFrequent 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
- DataInsights2 years ago
Super User
You could create a measure using DISTINCTCOUNT like this:
Count Subject = DISTINCTCOUNT ( 'Table'[Subject] )