need help in writing feeders for rules for string elements
Posted: Sat Nov 28, 2009 12:36 pm
Hi,
I am confused about writing the feeder for a string rule.
I am giving the data flow below -
rule in the source lookup cube is
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Lookup Source cube - Last_Period.cub
# ---------------------------------------------------------------------------------------------------------------------------------------------------
[{ 'Jan (01)', 'Feb (02)', 'Mar (03)', 'QTR1' }, 'QTR_info'] = S:
'Q1' | SUBST( !Years, 3, 2);
The rule in the destination cube taking string value from the source cube is -
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Destination cube rule
# ---------------------------------------------------------------------------------------------------------------------------------------------------
['QTR_info'] = S:
IF( DB('DestinationCube', !Currency, !Years, !Months, !type, !reference, !branch, !Customer, 'DealThisCustomerFlag') = 1 &
DB('DestinationCube', !Currency, !Years, !Months, !type, !reference, !branch, !Customer, 'Weighted_Average_Balance' ) > 0,
DB('Last_Period',!Years,!Months,'QTR_info'),
' '
),
' '
);
The QTR_info value shows properly in the destination view. But when I suppress zero in the destination view, the QTR_info value is not shown anymore.
So I need to write the feeder statement for this rule so that the value is displayed properly.
Also the same QTR_info element is exported from the destination cube, in a CSV file format using the 'ASCIIOUT' function in the TI. The numeric elements in the export file are properly showing but the QTR_info does not appear at all. The feeders for the numeric elements is put properly so the numeric elements are exported correctly.
I am confused about writing the feeder for a string rule.
I am giving the data flow below -
rule in the source lookup cube is
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Lookup Source cube - Last_Period.cub
# ---------------------------------------------------------------------------------------------------------------------------------------------------
[{ 'Jan (01)', 'Feb (02)', 'Mar (03)', 'QTR1' }, 'QTR_info'] = S:
'Q1' | SUBST( !Years, 3, 2);
The rule in the destination cube taking string value from the source cube is -
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Destination cube rule
# ---------------------------------------------------------------------------------------------------------------------------------------------------
['QTR_info'] = S:
IF( DB('DestinationCube', !Currency, !Years, !Months, !type, !reference, !branch, !Customer, 'DealThisCustomerFlag') = 1 &
DB('DestinationCube', !Currency, !Years, !Months, !type, !reference, !branch, !Customer, 'Weighted_Average_Balance' ) > 0,
DB('Last_Period',!Years,!Months,'QTR_info'),
' '
),
' '
);
The QTR_info value shows properly in the destination view. But when I suppress zero in the destination view, the QTR_info value is not shown anymore.
So I need to write the feeder statement for this rule so that the value is displayed properly.
Also the same QTR_info element is exported from the destination cube, in a CSV file format using the 'ASCIIOUT' function in the TI. The numeric elements in the export file are properly showing but the QTR_info does not appear at all. The feeders for the numeric elements is put properly so the numeric elements are exported correctly.