Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data sheet(attached below). I want to calculate the % composition of the books of each subject wrt to the library. EX: 20% of the books in L1 are of history and 80% are of geogrpahy. I want to know the expression for calculating this. The dimension i want to use is, city and subject. the bar graph is stacked and the stacks should be made of diff. subjects in the respective libraries. I want to filter the data acc. to library. I am attaching the qvw file for reference.
Maybe like attached?
You can calculate the percentage by dividing the sum of books by the total number of books across all subjects, so probably you need something like
=sum([No. of Books]) / sum(total<City> [No. of Books])
You can format the expression on number tab in charts properties.
See also attached.
Regards,
Stefan
Thanks swuehl for the reply. 3rd graph wil work for me, one more thing, if i want to put 3 dimensions in my chart and enable condition on two of them, either this one or that one. then what changes i will have to do in the expression so that 3rd graph works for me.
Just add School to the TOTAL qualifier field list:
sum([No. of Books]) / sum(total<City,School> [No. of Books])
Okk, thanks swuehl.......
If i have to calculate growth in % composition of the books in 1 month, then what should be the expression.
EX: if % of history books in was 20% in previous month and now 25%, then the growth is 5%.
I have one more coloumn added in the table known as time period, which contain two entries: current and previous, which means current month and previous month. now, what should be the expression?