Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Why the following SCRITP code is FAILING in this "IF" FUNCTION,
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
ERROR: Invalidad Expression
That IF function is located at the bottom.
Conversion_rates_mapping:
Mapping LOAD
Action,
Conver_rate
FROM [lib://TEST APP/Conversion_rates.xlsx]
(ooxml, embedded labels, table is CONVERSION_RATES);
[DATE_PRODUCTION]:
LOAD
"Date",
Action,
Production,
Production *ApplyMap('Conversion_rates_mapping', Action) as SALES_CONVERTED
FROM [lib://TEST APP/Conversion_rates.xlsx]
(ooxml, embedded labels, table is DATE_PRODUCTION);
[DATE_PRODUCTION_3]:
NoConcatenate
LOAD
"Date",
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
Conversion_rates_mapping:
Mapping LOAD
Action,
Conver_rate
FROM [lib://TEST APP/Conversion_rates.xlsx]
(ooxml, embedded labels, table is CONVERSION_RATES);
[DATE_PRODUCTION]:
LOAD
"Date",
Action,
Production,
Production *ApplyMap('Conversion_rates_mapping', Action) as SALES_CONVERTED
FROM [lib://TEST APP/Conversion_rates.xlsx]
(ooxml, embedded labels, table is DATE_PRODUCTION);
[DATE_PRODUCTION_3]:
NoConcatenate
LOAD
"Date",
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
Resident [DATE_PRODUCTION];
Resident [DATE_PRODUCTION];
When we are performing aggregation at script, eg(Sum):
Group by clause is required.
[DATE_PRODUCTION_3]:
NoConcatenate
LOAD
"Date",
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
resident <Your TableName>
Group by
Date;
You're missing Group By in your script.
Try this..
Load Date,
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
Resident Date_Production
Group By Date;
When we are performing aggregation at script, eg(Sum):
Group by clause is required.
[DATE_PRODUCTION_3]:
NoConcatenate
LOAD
"Date",
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
resident <Your TableName>
Group by
Date;
You're missing Group By in your script.
Try this..
Load Date,
IF(Action='Action1',SUM(SALES_CONVERTED)) as Sales_converted_Action1
Resident Date_Production
Group By Date;