You can build a portfolio as a data analyst by working on personal projects, participating in online competitions, and contributing to open-source projects.