Hello Neslihan Topalhasan,
Thank you for reaching out to us on the Microsoft Q&A forum.
Kindly create a metric for Male and Female to use in the slicer and create a measure as highlighted in the screenshots.
If you are still facing any issue, please let us know in the comments and where you are encountering this error along with the screenshot for reference. We are glad to help you.
Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.
Thank you.