Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Measures Plotted by Year

The task at hand is to plot the number buys in each media type (Newspaper, TV, Magazine, etc) for the last five years.  In a line chart, I set a dimension of year and a measure of type.  I created a measure for each type and created an expression such as: if (pubType='TV',aggr(count(pubType),jobYear),0))

This seems to work if a salesperson has buys of only one media type, if they have buys for 2015 in newspaper and TV, it plots nothing.

I have played with some set analysis expressions but can’t seem to get past this issue.

The attached image shows 3 newspaper buys in 2015 and 7 in 2014.  2013 should show 8 billboard, 1 newspaper and 1 online.  It is at this point that my expression breaks.

Can anyone point me in the right direction on this one?

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

The expressions should be like (with dimension of Year)

Count({<pubType = {'TV'}>} pubType)

But if pubType is also a dimension, then all you need is

Count(pubType)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

The expressions should be like (with dimension of Year)

Count({<pubType = {'TV'}>} pubType)

But if pubType is also a dimension, then all you need is

Count(pubType)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

I have answered, but it has gone into moderation for no obvious reason...

t1.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Awesome! I've been trying everything under the sun...hard to believe I didn't try that...