Maybe you can post your application because .
Try this :
One dimension : Month
- count( if( var = 1 , id) ) with a bar representation
- count( if( var = 2 , id) ) with a bar representation
- sum( target) with a line representation on the left axis (go to axis , check position = left for this expression)