The best way to get total flow is to configure your flow meter for pulse outputs, and count the pulses.
As an alternative, you can use some math and get flow rate for a set time period and then calculate the flow total, but it will not be 100% accurate, it will just be a calculated flow total, the accuracy will depend on your sample time, and how steady the flow rate is. Even with a short sample time, and a consistent flow rate, you will lose some accuracy during the flow start up and shut down.
In the future, it would be better to post in the main forum, as not everyone checks the practice area.