We use the past perfect continuous to look back at a situation in progress.
- It was a good time to invest. Inflation had been falling for several months.
- Before I changed jobs, I had been working on a plan to reduce production costs.
- We had been thinking about buying a new house but then we decided to stay here.
We use it to say what had been happening before something else happened.
- It had been snowing for a while before we left.
- We had been playing tennis for only a few minutes when it started raining.
- He was out of breath when he arrived because he had been running.
We use it when reporting things said in the past.
- She said she had been trying to call me all day.
- They said they had been shopping.
- I told you I had been looking for some new clothes.