How to calculate CSI-RS EPRE for CSI-RS 32 ports in 5G NR?

In 5G NR, powerControlOffsetSS is power offset of NZP CSI-RS RE to SSS RE. It can be {-3dB, 0dB, 3dB, 6dB) following 3GPP TS38.331.
I don’t know if CSI-RS RE is calculated for one RE in each port or all 32 ports? What is the formular to calculate CSI-RS EPRE?

For example, SS EPRE is the sum of SS EPRE 1 port and anenna gain, because SS/PBCH can be transmitted on all 32 antenna to achieve beamforming gain. If power of 1 tx port is 40dBm, SS EPRE = 40 - 10log10(273*12) + 10log10(32) = 19.19.