Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field called DataTime, which shows what quarter the data is from. It has values such as 2013Q1, 2012Q4, 2012Q3, etc.
I created another island table off of it called %Quarters, which just lists the quarters. This is so the users can do a comparison of any two quarters. For the most part, they'll always be looking at one quarter of data, so for DataTime, there must always be a selected value. If I have 2013Q4 selected in DataTime, and 2012Q4 selected in %Quarters, I want to see both quarters data, and the difference.
I used the following to see the data for 2012Q4:
Sum({$<DataTime={"=DataTime=%Quarters"}>} Premium)
but for some reason, it's only coming up with numbers when I have DataTime and %Quarters set to the same value. Shouldn't the set analysis ignore my selection in DataTime? Why isn't this working?
Probably you want to:
Sum({$<DataTime=, %Quarters=>} Premium)
Hi
DataTime and %Quarters are two fields with no association between them. Remember that the set expression is evaluated once for the object and has no knowledge of the dimensions in a chart or table. What you are asking it is to compare DataTime a list of values. This is not a legal operation so it returns null.
When you select something on %Quarters, then DataTime is being compared to a value and your expression works.
Assuming that %Quarters is a dimension in a chart, you would need to use sum(if()) to compare them.
Sum(If(DataTime = %Quarters, Premium)
Hope that helps
Jonathan