MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now Learn More
select
<dimensions>
, sum(
case
when MyDimension = 'a' then MyMeasure
end
) as 'A'
, sum(
case
when MyDimension = 'B' then MyMeasure
end
) as 'B'
, <etc>
So, all of your measure values are pre-aggregated by the query into each respective bucket. Calculations are handled as needed. Each bucket becomes a column in a List visualization.select
<dimensions>
, d.MonthAbbrev
, cast(d.Year, varchar(4)) as 'Year'
, <measure>
from <tables>
inner join MyDateTable d on d.DateID = fact.DateID
where d.Year = _year(_add_months(current_date, -1))
and d.MonthNum <= _month(_add_months(current_date, -1))
select
<dimensions>
, d.MonthAbbrev
, cast(d.Year, varchar(4)) as 'Year'
, <measure>
from <tables>
inner join MyDateTable d on d.DateID = fact.DateID
where d.Year = _year(_add_months(current_date, -1)) - 1
and d.MonthNum = _month(_add_months(current_date, -1))
select
<dimensions>
, d.MonthAbbrev || cast(_year(_add_months(current_date, -1)) - 1, varchar(4)) || '(abs)' as 'MonthAbbrev'
, 'Diff ' || d.MonthAbbrev || cast(_year(_add_months(current_date, -1)), varchar(4)) || '/' as 'Year'
, abs(
sum(
case
when d.Year = _year(_add_months(current_date, -1))
then <measure>
end
) -
sum(
case
when d.Year = _year(_add_months(current_date, -1)) - 1
then <measure>
end
)
) as 'MeasureName'
from <tables>
inner join MyDateTable d on d.DateID = fact.DateID
where d.Year in (_year(_add_months(current_date, -1)) - 1, _year(_add_months(current_date, -1)))
and d.MonthNum = _month(_add_months(current_date, -1))
TOTAL(
CASE [Year Num]
WHEN 2018
THEN [Sales Amount]
END for [Product Category])
In the "properties" property of the Product Category I checked the calculated measure above. What Cognos gave me as a result is the total Sales Amount for each category for the year 2018, which is fine for that. But it completely ignores the YearMonths in the columns and repeats the total 2018 numbers in each column.Date BETWEEN ?Start_Date? AND ?End_Date?will work as a filter expression in Current_Manager, all built in the GUI.
BSP Software Documentation |
MetaManager Documentation and Knowledgebase |
Version Control Documentation and Knowledgebase |
BSP Software | Resources | About Us | ||
MetaManager | BSP Software Training | BSP Software | ||
Integrated Control Suite | YouTube Channel | Micro Strategies Inc | ||
Security Migration | IBM Cognos | |||
Integrated Management Suite | ||||