If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Is this type of report possible?

Started by patrickthatcher, 18 May 2015 11:26:33 AM

Previous topic - Next topic

patrickthatcher

Howdy. I have a single summary table that has been overly simplified below
TABLE layout :
Greg_Date
Level1
Level2
Level3
Sales_Amt
Prod_Cnt

The request is to display the data in a hierarchical fashion (drill down preferred) but the caveat is the data has already been summarized such that I cannot roll up the data from the bottom as one would normally expect to do.
How we currently handle this in an ASP grid is with custom SQL run for each level.  For example :

Top Level query
Select Level1, sum(Sales_Amt), sum(Prod_Cnt) from TABLE WHERE Greg_Date between Date1 and Date2 and Level2 is null group by Level1;

Level2 query
Select Level1, Level2, sum(Sales_Amt), sum(Prod_Cnt) from TABLE WHERE Greg_Date between Date1 and Date2 and Level3 is null and Level1 = [Selected Level1]    group by Level1, Level2;

Level3 query
Select Level1, Level2, Level3, sum(Sales_Amt), sum(Prod_Cnt) from TABLE WHERE Greg_Date between Date1 and Date2 and Level1 = [Selected Level1] and Level2 = [Selected Level2]    group by Level1, Level2,Level3;

How would I model this in FM?