DSM-V: Criteria E
E. The symptoms are not attributable to the physiological effects of a substance (e.g., blackouts or chaotic behavior during alcohol intoxication) or another medical condition (e.g., complex partial seizures).
This is a simple "differential diagnosis" criteria that states that one should eliminate the possibility that altered states of consciousness are caused by substance use of any type, or by another illness.
A common example would be state-dependent memory changes when one is intoxicated with alcohol. A person can sometimes experience blackouts and lowering of inhibitions, and thus it appears their personality has changed, and they have lost memory. They may act out of character, and they may recall what they did while they were drunk when they drink again i.e. the state-dependent memory recall can be intact when they drink again.
If this is a person's only example of personality changes or identity changes and memory gaps, then they would not be suitable for a DID diagnosis.
This information is not presented as a means of self-diagnosis, but to attempt to explain the criteria to persons already diagnosed who may be confused about how the criteria apply to themselves.