Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
below code is not working
REQ:
load
INDICATOR_NAME,
//INDICATOR_NAME as NEW_INDICATOR_NAME,
INDICATOR_VALUE as NEW_INDICATOR_VALUE
//FRQ_TYPE as NEW_FRQ_TYPE
Resident Raw_Indicator_by_Country_F
Where
WildMatch(upper(FRQ_TYPE),'A')=0 and WildMatch(upper(FRQ_TYPE),'Q')=1;
Concatenate
LOAD
INDICATOR_ID,
INDICATOR_NAME as NEW_INDICATOR_NAME,
INDICATOR_VALUE as NEW_INDICATOR_VALUE,
FRQ_TYPE as NEW_FRQ_TYPE
Resident Raw_Indicator_by_Country_F
Where wildmatch(FRQ_TYPE,'A')=1 and ;
not able to make any associativity please suggest
This line is not correct: Where wildmatch(FRQ_TYPE,'A')=1 and ;
There's no second condition after the and.
not able to make any associativity please suggest
'concatenate' will add the records from the load to an existing table. It won't create another table. You won't get two associated tables if you use concatenate.
Hi Gysbert,
thanks for reply
below is scenario
As per requirement if FRQ_Type is A then i need to show Q4 data for FRQ_TYPE A,otherwise need to put Q4 data for FRQ type Q
can you please suggest what would be condition for this.
please find my attached data model for this
thanks
Hi All,
Can you please suggest on this
thanks
test:
Load
YEAR1,
INDICATOR_VALUE as new_value
Resident Raw_Indicator_by_Country_F
Where INDICATOR_NAME='% of Non-Bank Private Debt to Nominal GDP' and (FRQ_TYPE ='A' or (FRQ_TYPE='Q' and QUARTER1='Q4'));
Hi Manish,
Thanks for response but can you please suggest what would be condition if there are more than one indicator is present.
Moreover newly created table is not associated with origional data model properly.
If we can apply some selections it is not showing perfect results.
thanks
Replace
INDICATOR_VALUE as new_value
by
INDICATOR_VALUE
Hi Manish,
Still condition is not working.
If Both FRQ type A and Q is present then i need to show data for Q4 for FRQ typr A.
If FRQ type A is not present then I need to show data for FRQ type Q .
But it seems after applying above filter i am able to get both values for indicator for A and Q.
Moreover in data model there is no associativity."I have attachched my sample data model for this.
Please suggest
Still condition is not working.
If Both FRQ type A and Q is present then i need to show data for Q4 for FRQ typr A.
If FRQ type A is not present then I need to show data for FRQ type Q .
But it seems after applying above filter i am able to get both values for indicator for A and Q.
can you please suggest what condition i need to put in below code
Binary
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
test1:
Load
// YEAR1,
INDICATOR_VALUE,
INDICATOR_VALUE as NEW_INDICATOR_VALUE
Resident Raw_Indicator_by_Country_F
Where INDICATOR_NAME='% of Non-Bank Private Debt to Nominal GDP' and (not FRQ_TYPE ='A') and QUARTER1='Q4' ;
//FRQ_TYPE ='Q' and QUARTER1='Q4';
//
test_final:
Load
// YEAR1,
INDICATOR_VALUE,
INDICATOR_VALUE as NEW_INDICATOR_VALUE1
Resident Raw_Indicator_by_Country_F
Where INDICATOR_NAME='% of Non-Bank Private Debt to Nominal GDP' and FRQ_TYPE ='A';
Concatenate
LOAD * Resident test1;
//
drop Table test1;
Calculation:
load *,
if(NEW_INDICATOR_VALUE=1,NEW_INDICATOR_VALUE,NEW_INDICATOR_VALUE1) as required_value
Resident test_final;
drop Table test_final;
//(FRQ_TYPE ='A' and FRQ_TYPE<>'Q' and QUARTER1='Q4') or (FRQ_TYPE='Q' and FRQ_TYPE<>'A'and QUARTER1='Q4') or FRQ_TYPE ='A';
thanks
Hi All,
Can you please suggest on this
thanks