You can simply right click on country dimension>create>group
Give a name to this group. Select your countries and click on group. You can use Ctr key to select multiple countries.
Your group will be like this. You can rename as per your continent name.
In the similar fashion you can create your rest of groups. After creating all the groups if any country left then you can put it in Other group after checking the "Include 'Other'" option.
thanks a lot for your help it helped me a lot
Drag your created group continent dimension in the row shelf too after country.
Pls mark my answer as correct if you found this helpful.
so that this thread gets complete.
yes It worked thanks a lot for your help