Treasures are spread across a few levels in the game. If you happen to get a level with a chest in it, do the following:
Collect the chest and quit out of the duel by running away (left of the 2 top right icons) - then repeat the same step 2 times more. The game counts every chest no matter if you finished the fight or not.