Focal Point
[CLOSED] cnotation; referencing columns and Across

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1967046876

September 29, 2015, 04:13 PM
Nicholas Spyrison
[CLOSED] cnotation; referencing columns and Across
Lets say I have
  SUM
 Num1
 Num2
 COMPUTE cNum3/D12.2 = C1 + C2;
ACROSS Flavor 


CNOTATION works and C1, C2 point back to Num1, Num2.

is there an "ANOTATION" that allows me to refer back to the different levels of an Across field?

This message has been edited. Last edited by: <Kathryn Henning>,


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
September 29, 2015, 06:13 PM
Doug
What is it that you're attempting to do here, with different levels of an Across field?

You can refer to the columns by the field name instead of the notations (C#, N#,etc). Or, C#(#), where the 1st # is the column and the 2nd# is the occurrence.

You can post more code, using an IB sample file, within the </> brackets as seen above.
September 29, 2015, 06:47 PM
Nicholas Spyrison
akin to the above case; I compute a subtraction of 2 fields. I have:
 SUM
     Ledger_Amount/D12.2B AS 'Actual'
     Budget_Amount/D12.2B AS 'Budget'
     COMPUTE Variance/D12.2B = Ledger_Amount - Budget_Amount;
     COMPUTE Variance_Pct/D12.2% = 100 * ( ( Ledger_Amount - Budget_Amount ) / Ledger_Amount ); AS '% Variance'
BY  GL_Account_Finance_Tree_name HIERARCHY
BY  Date_Calendar_Month NOPRINT
ACROSS LOWEST Date_Date_Calculation
ulation EQ 'MTD' OR 'QTD' OR 'YTD'; 


in another case I want to compute subtractions across levels of the across field. ie) Ledger_Amount this year - Ledger_Amount last year.

   SUM
     Ledger_Amount
     COMPUTE Test1/D12.2B = C1 - 1;
BY  GL_Account_Finance_Tree_name HIERARCHY
BY  Date_Calendar_Month
WHERE Date_Date_Calculation EQ 'MTD' OR 'MTD LY' OR 'QTD' OR 'QTD LY'; 



Because I am using a cube I run into issues when I try to define/compute
IF Date_Date_Calculation EQ 'MTD' THEN Ledger_Amount ELSE 0

namely, it forces Date_Date_Calculation to act as a by field regardless of its absence in the code. If I use a hold file and Sum to account for the resulting zeros then I lose the Structure of the GL_Account_Finance_Tree_name HIERARCHY...


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
September 30, 2015, 10:24 AM
Rifaz
quote:
If I use a hold file and Sum to account for the resulting zeros then I lose the Structure of the GL_Account_Finance_Tree_name HIERARCHY...


Not worked in cube so far, however just here to say that after holding a file, you can refer a columns using E01, E02 ...


-Rifaz

WebFOCUS 7.7.x and 8.x
September 30, 2015, 11:21 AM
Danny-SRL
Nicholas,
Welcome to the Forum. Please update your signature with version of WF etc.
quote:

SUM
Ledger_Amount/D12.2B AS 'Actual'
Budget_Amount/D12.2B AS 'Budget'
COMPUTE Variance/D12.2B = Ledger_Amount - Budget_Amount;
COMPUTE Variance_Pct/D12.2% = 100 * ( ( Ledger_Amount - Budget_Amount ) / Ledger_Amount ); AS '% Variance'
BY GL_Account_Finance_Tree_name HIERARCHY
BY Date_Calendar_Month NOPRINT
ACROSS LOWEST Date_Date_Calculation

Beware when you reformat a field within the TABLE request: for each reformatted field you will have 2 internal fields and this impacts the C-notation.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

September 30, 2015, 11:57 AM
Nicholas Spyrison
Will do.

Interesting, I think I was running into that. Thanks for the heads up.


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
October 06, 2015, 10:46 AM
Nicholas Spyrison
 C#(#), where the 1st # is the column and the 2nd# is the occurrence. 


whats is second occurrence referring to? a different level of across? If so this may work otherwise I think I will have to play around with the SASS ENGINE SET.


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube