Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community.
I have a combo bar/line chart with one dimension (year...2012 - current) and two expressions.
The first expression has values for all the years available (bars on chart).
The second expression has values for only some of the years (more recent years) and is represented by the line on chart.
In the chart, I would only like to show the years where there are values for the second expression.
I thought I would have been able to use Conditional on the dimension tab in properties with an expression that says:
Sum(Sales)>0,
but it didnt work. I may have had the syntax wrong or maybe I may be looking in the wrong tab in the properties.
any ideas provided will be tried and tested.
Thanks in advance.
You mean your conditional dimension, right? Try this
=Aggr(If(Sum({$<[Date Type] = {'VPP Dates'}>} [Function NTEI])>0, Year), Year)
Add an Aggr() function to do this
Aggr(If(Sum(Sales) > 0, Year, Year)
I have set up my conditional expression as follows:
=Aggr(If( Sum({$<[Date Type]={'VPP Dates'}>}[Function NTEI])>0),Year)
but I did not get the desired result...
You mean your conditional dimension, right? Try this
=Aggr(If(Sum({$<[Date Type] = {'VPP Dates'}>} [Function NTEI])>0, Year), Year)
I have applied it in the "Enable Conditional", but it is not working.
Are you thinking maybe a calculated dimension?
Very true. As a calculated dimension it works as expected so i will go with that. I was under the impression I would have been able to accomplish the same task without having to create a calculated dimension, but I am glad that I was able to find a simple solution!
Thanks and I appreciate how quickly you did it!
There is def. a solution which doesn't use calculated dimension... all you need to do is to add this set analysis to all your expressions
{<Year = {"=Sum({$<[Date Type] = {'VPP Dates'}>} [Function NTEI])>0"}>}
Awesome. The first way you advised is working like a charm.