I'm a little bit foggy regarding
a 'national average' as a Parameter --
wouldn't it be a Calculation instead?
Besides, my guidance on the next step would be
making a distinct view for each Measure (one stacked bar),
then combining them all side-by-side on a dashboard.
You'd be able to make different Ref Lines for each then.
Sorry, maybe I wasn't clear. I work for a local council, so we have a data file for all of the pupils in all of our schools. That is what I am putting into Tableau so that I can produce a report on the test results by school. This data file only covers our own schools and not those from the rest of the country – the national averages that I want to show with the reference lines are just going to be static figures that I have taken from the government's statistical release. Yes, if I had the data file for the whole country then they would be calculations, but in this situation they are just manually typed numbers.
If there's no easy way to have a variable reference line against 'measure values' then I will look into drawing each block as a separate chart, but I was trying to avoid that because of the difficulty in lining them up and ensuring that the axes are the same across all of the charts (in some cases I will want axes that scale to the content rather than just going to 100%).
Stephen, no prob.
If there's no easy way to have a variable reference line against 'measure values'...
In Tableau, [Measure Names] is a special purpose pill (so is Measure Values).
There's no way to make [Measure Names] behave in full like a 'real' Dimension --
and this includes rendering a distinct Mark for each (Measure Name) value
and a distinct Reference Line object for each Header (per Cell).
To get what you want (at least visually) a Dimension should be used (on Columns)
with the unique values the same as the (necessary) Measure Names.
This could be done for example by UNIONing the datasource -- as many times
as the number of Measure Names (columns) to be on a view.
The [Table Names] Dimension could be used (in a pair of calculations)
for placing the Measures names as Headers on Columns (a blue pill)
and their respective Measures values on Rows (a green pill).