Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I'm trying (and failing) to show the following in a single chart. I've heavily simplified the data..
Category | Relevant? |
---|---|
A | Y |
A | |
A | Y |
A | Y |
B | |
B | Y |
B |
The 'Category' column is just a list of text, the 'Relevant?' column either has something in it or it doesn't. I need to see the percentage of what is relevant, by category.
I'm currently using for the expression:
count([Relevant?])/count(Total [Category])
When one category is selected from the field, the chart correctly shows (for A, for example) 75% (count of 3 As with a Y in 'Relevant?' divided by a total count of 4 As), so this works. The problem arises when both (for example) A and B are selected and shown on the same chart. What the expression does is:
For A: 3 divided by 7 (3 As with a Y divided by the total number of As plus Bs (I think) which gives 43%, despite it showing 75% when just A is selected)
For B: 1 divided by 7 (1 B with a Y divided by the total number of Bs plus As which gives 14%)
I understand why it's doing this, it's showing the categories seperately on the chart but then dividing it by the total of the categories slected, for both categories. I've tried a few different expressions but I can't seem to find one that will give me, on the same chart 3 divided by 4 for A and 1 divided by 3 for B ie divided by the total count for each category..?
I'm really new to this (sorry!), so give me a nudge if I've not been clear enough.
Thanks
Try: count([Relevant?])/count(Total <Category> [Category])
Try: count([Relevant?])/count(Total <Category> [Category])
Amazing - Thank you!