How to solve a month problem ?

Post Reply
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

How to solve a month problem ?

Post by beber005 »

Hello everyone,
I created a process that works very well. I'm trying to develop it to make it even more automatic . However, I face a problem which I can not find solutions that is why I turn to you today.
I 'll try to explain all this as best I can.

My process takes me a file with the following structure:

Code: Select all


vYear = SUBST(pYear,3,4);
vMonth = SUBST(pMonth,2,2);

# Ce code fait référence ici à l'en tête de notre fichier qui doit être écrit une seule fois pour toutes les lignes
# --------------------------------
# Traitement sur la date
# -------------------------------

# Je transforme les paramètres qui sont en entrés afin de constuire
# une date qui puisse être comparée aux dates contenues dans mon
# cube de paramètre : delivery date et ready to delivered
vYM = vYear | '-' | vmonth | '-' | '01';
vYM2 = DAYNO(vYM);
ASCIIOutput(cOutputLog, NumberToString(vYM2));
While (vYM2 <> 
If( vHeader = 0);
	# ------------------------------------------------
	# Création de mon architecture père/fils
	# ------------------------------------------------
	# Permet de spécifier à TM1 que je ne veux pas de guillemets en début et fin de ligne
	DatasourceASCIIQuoteCharacter='';
    # Les lignes qui suivent permettent de construire l'architecture de la dim AIRCRAFT
	ASCIIOutput(cOutputLog, 'Father' | ';' | 'Child' | ';' | 'MSN' | ';' | 'NameEN' | ';' | 'NameFR' | ';' | 'Type' | ';' | 'Serie' | ';' | 'Code' | ';' | 'FirstFlight' | ';' | 'Retreatment_IFRS');
	ASCIIOutput(cOutputLog, ';Aircraft_Prod_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | 'NA_A42_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | 'NA_A72_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | 'NA_A42_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | 'NA_A72_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_WIP_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_FG_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_WIP_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
	ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_FG_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );

# En incrémentant cette variable, on signale que l'on ne rencontre qu'une seule fois dans ce If
# Ceci permet donc de n'avoir qu'un seul en tête pour toutes nos lignes
vHeader =1;
EndIf;
I have 2 parameters that are a year and a month . The month is the current month . This is where I have a problem because the proces I wrote does treatment for one particular month (the one I pass it as a parameter ) . But now I want it spits me the same file with every month precedes. The file would thus be as follows: all below pMonth + pMonth months.

I do not know if I could be easily understood in any case I hope.

Thank you very much in advance because it will remove me quite a problem if you have any solutions to offer me ... :oops:
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: How to solve a month problem ?

Post by Michel Zijlema »

To be able to do this you first need to have a notion of what a 'previous month' is.
A common setup is to use a previous month attribute or a time lookup cube, but you could also use a script calculated previous month or (not recommended) rely on the dimension index.
Once you have that notion, the code will depend of what type of datasource you're processing.

Assuming the datasource is a view, you could generate/update the source view on the Prolog tab, selecting all relevant months based on the pMonth parameter value. This selection can be created (as a subset assigned to the source view) by using a While loop (code assuming a previous month attribute and your period dimension is called 'dim_months'):
v_cur_mth = pMonth;
WHILE(DimIx('dim_months', v_cur_mth) <> 0);
SubsetElementInsert(...., v_cur_mth, ...);
v_cur_mth = AttrS('dim_months', v_cur_mth, 'Previous Month');
END;

Michel
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Okay michel I understand your proposition. I'm not in my office so I look more specifically this Monday :oops:
But thakn's a lot for your answer
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Hi Michel,

I have used your code and I modified some things but it doesn't work. Maybe it 's because I do something wrong. First, I changed your "SubsetElementInsert " by "SubsetGetElementName" because I just want the name of the month before. For instance when I write "M04", I want to see "M03" "M02" and "M01". Because my objectif is to build a document with specific header by month

Code: Select all

vMonth = SUBST(pMonth,2,2);
v_cur_mth = pMonth;
vCpt = 0;
While ( DIMIX(cDimMth, v_cur_mth) <> 0 );
	# SubsetElementInsert ( cDimMth,'test_Subset',v_cur_mth, vCpt + 1 );
	vMonth0 = SubsetGetElementName(cDimMth,'Month0', vCpt + 1);
	v_cur_mth = ATTRS(cDimMth, v_cur_mth, 'Month_after');
End;
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

And with this code I didn't success to retrieve the name of the months before. This, because in the function "SubsetGetElementName", the last element will be a number representing the position within the subset of the element you want to retrieve. I try to use "StringToNumberATTRS(cDimMth, v_cur_mth, 'Month_before');" but TM1 says me "can't convert to real number M04" ...
Sorry but I don't see the solution
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: How to solve a month problem ?

Post by Michel Zijlema »

Assuming you want to process a cube view and you want to include all months up to the specified month in pMonth. Assuming you have a specific month dimension and assuming you have set up a previous month attribute on that month dimension that holds the previous month name for each month.
Than the idea is to create/update the source view on the Prolog tab, making sure the source view contains the required month (and measures and other selections required). When this source view is set up correctly the process will run through the required set of months automatically.
The code I supplied builds a subset of all the required months based on the assumptions mentioned. This subset can be assigned to the source view.

If I look at what you did with that code you're confusing me. Why do you execute a SubsetGetElement? It suggests that you're running through an already existing subset. Where did this subset get created?
Why are you processing an attribute called 'Month_after'? Does this contain the previous month? If you already have a subset with the required months I'm not sure why you are retrieving this attribute for...

So after reading your code it's completely unclear now to what you're trying to do.

Michel
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Yes I'm running through an already existing subset named "Month0". The attribute called 'Month_after' contains the previous month yes. What I want to do is get the name of all previous months pMonth. With these names, I want to build my file.
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: How to solve a month problem ?

Post by tomok »

Why don't you tell us the business purpose of this process because your original post doesn't make any sense to me. I can't help you unless I understand the goal you are trying to achieve. I'm guessing what you are trying to accomplish is quite easy but I have no clue what it is.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Sorry then if I done wrong understanding. To do this clearly I want to create a file of the following form:

;Aircraft_Prod_04_2014;Production 12-2013;Production 04_2014_;;;;;;
Aircraft_Prod_04_2014;NA_PRD_04_2014;Production 04_2014*;;
Aircraft_Prod_04_2014;NA_ANT_04_2014;Anteriority 04_2014;
Aircraft_Prod_04_2014;NA_DEL_04_2014;Delivery 04_2014;

As you can see there the month and year in the different headings. My problem is the following : When I run my process I get a month and one year as a parameter. My titles are based on it to build itself. Currently it works perfectly but ONLY for a month as a parameter. What I want to do is:
- Enter a month and a year as parameters (like that : M04 and Y_2014)
- My process must create 4 different headings corresponding to the previous month ie (M03 - M02 - M01)
- And all this in a single file like that :

Code: Select all

;Aircraft_Prod_04_2014;Production 04_2014;
Aircraft_Prod_[b]04_2014[/b];NA_PRD_04_2014;
Aircraft_Prod_04_2014;NA_ANT_04_2014;
Aircraft_Prod_04_2014;NA_DEL_04_2014;

;Aircraft_Prod_03_2014;Production 03_2014;;
Aircraft_Prod_[b]03_2014[/b];NA_PRD_03_2014;
Aircraft_Prod_03_2014;NA_ANT_03_2014;
Aircraft_Prod_03_2014;NA_DEL_03_2014;

;Aircraft_Prod_02_2014;Production 02_2014;
Aircraft_Prod_[b]02_2014[/b];NA_PRD_02_2014;
Aircraft_Prod_02_2014;NA_ANT_02_2014;
Aircraft_Prod_02_2014;NA_DEL_02_2014;

;Aircraft_Prod_01_2014;Production 01_2014;
Aircraft_Prod_[b]01_2014[/b];NA_PRD_01_2014;
Aircraft_Prod_01_2014;NA_ANT_01_2014;
Aircraft_Prod_01_2014;NA_DEL_01_2014;
I thought using the solution given above through the prolog tab but I went on the idea of ​​a loop in the data tab.

You better understand my problem now or not ?
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: How to solve a month problem ?

Post by Michel Zijlema »

beber005 wrote:You better understand my problem now or not ?
I'm sorry beber005, but the more information you supply, the more I'm at loss at what you're trying to do...
If I look at the output I see some codes with a seemingly random amount of semicolons, a wildcard symbol (*) onthe 2nd row, etc.
What's the export file structure?
What are you trying to export: data from a cube, a dimension structure, audit data, ...?
What is the datasource of the process: a cube view, a flat file, an ODBC query, ...?

Michel
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

The lines you see are the lines that I construct "hard". If you want to know everything, I am using a cube view but it does not matter what I try to do.
I'll still try to do it simply. When I run my process I get 2 parameter. These two parameters are: month and year. They are the ones that I write the lines you see.
If I go back in April, I want my process to write me 4 different lines are as follows:

Aircraft_Prod_01_2014;Production 01_2014;
Aircraft_Prod_02_2014;Production 02_2014;
Aircraft_Prod_03_2014;Production 03_2014;
Aircraft_Prod_04_2014;Production 04_2014;

Is that better?
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to solve a month problem ?

Post by lotsaram »

So for a given combination of month + year given as parameters you want to write out a value from the given year/month combination plus the same data for all other preceding months in the same year?
If thats the case then the number of rows to spit out will be variable depending on the month parameter so a while loop would be the best way to accomplish this.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Yes I know I need to use a while loop, but my problem is to determine all previous month. When I write april in my parameter I didn't success to recover february end january you see ? Recover march is easier but the other month it's difficult
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to solve a month problem ?

Post by Alan Kirk »

beber005 wrote:Yes I know I need to use a while loop, but my problem is to determine all previous month. When I write april in my parameter I didn't success to recover february end january you see ? Recover march is easier but the other month it's difficult
I'm not completely clear on what you're doing either but I think I get the gist. Maybe.

It's also not at all clear what your dimensions are here; in particular whether you're using a single Month-Year time dimension or separate Month and Year dimensions. However the general principle will apply in either case.

If you pass the month parameter as a numeric code, all you need to do is use a While loop that back-steps from that month to the first one.

So, for example, if the month is April, instead of passing 'Apr' you pass 4. Let's suppose that pYear is the year parameter, and that it's a string. I'll assume that you have a single time dimension in the format YYYY_MM like your examples. Then (untested air code):

Code: Select all

    While (pMonth>1);
        # Add the leading 0 if necessary
        If ( pMonth<10);
            s_Month = '0';
        Else;
            s_Month = '';
        EndIf
        s_Month = pYear | '_' | s_Month | Trim ( Str ( pMonth, 2, 0 ) );
    
        dbl_MonthValue =CellGetN ( 'CubeName', s_Month, OtherElements);

        AsciiOutput('YourFile.txt', s_Month | ' Other text ' | Trim ( Str ( dbl_MonthValue , 12, 2 ) ) );

        pMonth= pMonth-1;

    End;
In other words, you just keep going back 1 month at a time until you hit the start of the year. For each value you convert the month number to the name of your period element. Then you use that element name to query the amount, and write it out to the file.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Carl Lonsdale
Posts: 11
Joined: Thu Feb 14, 2013 7:20 pm
OLAP Product: TM1
Version: 9.52 - 10.1
Excel Version: 14.0.6129.5

Re: How to solve a month problem ?

Post by Carl Lonsdale »

At the risk of beating a dead horse; and to expand on what Alan was saying, you can do the same thing in reverse: I.e. Step forward to the current month (Closer I think to what you were shooting for):
This starts with Jan, and spits out the same file upto (including) the current month entered.

Code: Select all

#Prologue
cOutputLog = 'Forum1.log';
vYear = SUBST(pYear,3,4);
vMonth = SUBST(pMonth,2,2);

#vYM = vYear | '-' | vmonth | '-' | '01';
#vYM2 = DAYNO(vYM);

iYear = vYear;
iCurrentMonth = vMonth;

#Set Loop Counter
iLoop=1;
#Get Rid of Quotes
DatasourceASCIIQuoteCharacter='';

#Loop over the security Dimension 1 month at a time from current period to Jan
While (iCurrentMonth >= iLoop);
	iCurrent = iYear|'-'|NUMBERTOSTRING(iLoop);

		ASCIIOutput(cOutputLog, 'Father' | ';' | 'Child' | ';' | 'MSN' | ';' | 'NameEN' | ';' | 'NameFR' | ';' | 'Type' | ';' | 'Serie' | ';' | 'Code' | ';' | 'FirstFlight' | ';' | 'Retreatment_IFRS');
		ASCIIOutput(cOutputLog, ';Aircraft_Prod_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A_DEL_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A_ANT_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A42_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A72_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_ANT_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A42_ANT_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_ANT_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A72_ANT_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_DEL_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A42_DEL_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A_DEL_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A72_DEL_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A42_WIP_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A42_FG_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A72_WIP_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | 'NA_A72_FG_' | NUMBERTOSTRING(iLoop) | '_' | iYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
		#Increment to Next Month:
		iLoop = iLoop + 1;
End;

Output looks like this:

Code: Select all

Father;Child;MSN;NameEN;NameFR;Type;Serie;Code;FirstFlight;Retreatment_IFRS
;Aircraft_Prod_1_14;;;;;;;;;
Aircraft_Prod_1_14;NA_A_PRD_1_14;;;;;;;;
Aircraft_Prod_1_14;NA_A_DEL_1_14;;;;;;;;
Aircraft_Prod_1_14;NA_A_ANT_1_14;;;;;;;;
NA_A_PRD_1_14;NA_A42_PRD_1_14;;;;;;;;
NA_A_PRD_1_14;NA_A72_PRD_1_14;;;;;;;;
NA_A_ANT_1_14;NA_A42_ANT_1_14;;;;;;;;
NA_A_ANT_1_14;NA_A72_ANT_1_14;;;;;;;;
NA_A_DEL_1_14;NA_A42_DEL_1_14;;;;;;;;
NA_A_DEL_1_14;NA_A72_DEL_1_14;;;;;;;;
NA_A42_PRD_1_14;NA_A42_WIP_1_14;;;;;;;;
NA_A42_PRD_1_14;NA_A42_FG_1_14;;;;;;;;
NA_A72_PRD_1_14;NA_A72_WIP_1_14;;;;;;;;
NA_A72_PRD_1_14;NA_A72_FG_1_14;;;;;;;;
Father;Child;MSN;NameEN;NameFR;Type;Serie;Code;FirstFlight;Retreatment_IFRS
;Aircraft_Prod_2_14;;;;;;;;;
Aircraft_Prod_2_14;NA_A_PRD_2_14;;;;;;;;
Aircraft_Prod_2_14;NA_A_DEL_2_14;;;;;;;;
Aircraft_Prod_2_14;NA_A_ANT_2_14;;;;;;;;
NA_A_PRD_2_14;NA_A42_PRD_2_14;;;;;;;;
NA_A_PRD_2_14;NA_A72_PRD_2_14;;;;;;;;
NA_A_ANT_2_14;NA_A42_ANT_2_14;;;;;;;;
NA_A_ANT_2_14;NA_A72_ANT_2_14;;;;;;;;
NA_A_DEL_2_14;NA_A42_DEL_2_14;;;;;;;;
NA_A_DEL_2_14;NA_A72_DEL_2_14;;;;;;;;
NA_A42_PRD_2_14;NA_A42_WIP_2_14;;;;;;;;
NA_A42_PRD_2_14;NA_A42_FG_2_14;;;;;;;;
NA_A72_PRD_2_14;NA_A72_WIP_2_14;;;;;;;;
NA_A72_PRD_2_14;NA_A72_FG_2_14;;;;;;;;
Etc...
Etc...
If you don't have numeric month elements As Alan said this becomes a little trickier, but you could quick fix it by adding Aliases.
Hope this helps.
beber005
Posts: 57
Joined: Mon Mar 03, 2014 2:18 pm
OLAP Product: Cognos
Version: 9.5.1
Excel Version: 2010

Re: How to solve a month problem ?

Post by beber005 »

Hi Carl Lonsdale,

Your solution works and gives me 4 differents headers. BUT (lol yes I know I have some problems to explain what is my real problem) under these headers I need to write information. These information are going from a cube's view. This view has a list of number. These numbers have statutes and these statutes change in the year. But with your solution I did not sucess to combine differents headers and under these headers information associated.

Sorry Alan I'm not to my office, I will see how to use your proposition. and thank's a lot for your help from the beginning lol (I know I'm ball ^^)
Post Reply