Forum Discussion
RonLieuw
8 years agoHelper I
Calculated item alternative
I need to calculate a Sex ratio ([male/female]*100) for every year. I read on the forum to make 3 measure e.g F, M and use sexratio=M/F. I am having problems calculating the measures F and M, wh...
- 8 years ago
Hi,
Do not drag Sex to the column area section. Just drag years to the row area section and then write the 3 measures that i shared with you in my earlier post.
v-piga-msft
8 years agoResident Rockstar
Hi RonLieuw,
You could create the measure below to calculate the Sex ratio ([male/female]*100) for every year without Unpivot Columns.
Sex_ratio =
VAR male =
SUM ( Sheet1[Male] )
VAR female =
SUM ( Sheet1[Female] )
RETURN
DIVIDE ( male, female ) * 100You could refer to the output below.
Hope it can help you!
Best Regards,
Cherry
RonLieuw
8 years agoHelper I
Hi Cherry, thanks for showing me this method of calculating the sex ratio before unpivoting the columns. I was not aware you could do it as you proposed.
Does this means that it is not possible to calculate the sex ratio if the tabel has been pivotted?