Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
please tell me where i'm doing wrong with this code
tab1:
LOAD int_fk_dim_business_owner as pk_dim_business_owner,
int_fk_dim_channel,
int_fk_dim_entity as pk_dim_entity ,
int_fk_dim_geo as pk_dim_geo ,
int_fk_dim_industry as pk_dim_industry,
int_fk_dim_market,
int_fk_dim_product,
int_fk_dim_pov as pk_dim_pov,
int_fk_dim_period as pk_dim_period,
int_fk_dim_uom as pk_dim_uom,
int_fk_data_detail as pk_data_details,
money_measure,
int_fk_load_id,
version_no,
le_version_no,
int_fk_dim_pov_2
FROM
E:\Satya\qvd\FACT_FINANCIALS.qvd
(qvd);
join
HierarchyBelongsTo( str_coa_code,str_partent_coa_code,node_name,ancestor_id,ancestor_name)
LOAD
str_coa_code,
str_partent_coa_code ,
str_coa_description as node_name,
pk_data_details
FROM
E:\Satya\qvd\DIM_DATA_DETAILS.qvd
(qvd);
LOAD
pk_data_details as PK_DATA_DETAILS,
ancestor_id as ANCESTOR_ID,
str_coa_code,
sum(money_measure)
Resident tab1
Where ancestor_id=' BS020030040010000000000000000000'
Group by pk_data_details,ancestor_id,str_coa_code;
hi Kumar what is the error u r getting while running this code ...
provide that one also it may simplify u r problem
this is the error while loading script
"execution of script failed"
Check your Group By, it should be Group By Money_measure.
hello Kiran
Groupby function cant work on the field which is used for aggregation function like sum
Hi,
you need to group by all field where you aggregate, like this:
LOAD
pk_data_details as PK_DATA_DETAILS,
ancestor_id as ANCESTOR_ID,
str_coa_code,
sum(money_measure) as money_measure
Resident tab1
Where ancestor_id=' BS020030040010000000000000000000'
Group by pk_data_details, ancestor_id, str_coa_code ;
I did that but its not working,HierarchyBelongsTo function is giving some problem i think
i changed my question,please review it
Hi..
Refer the document below once , which will give clarity about HierarchyBelongsTo() function ...