This comes from the Qlik Sense help:
You can find more information here: https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/direct-discovery-field-li…
Direct Discovery does not support using aggregations in LOAD statements. If aggregations are used, the results are unpredictable. A LOAD statement such as the following should not be used:
DIRECT QUERY DIMENSION stateid, SUM(amount*7) AS MultiFirst MEASURE amount FROM sales_table;
The SUM should not be in the LOAD statement.
Direct Discovery also does not support Qlik Sense functions in Direct Query statements. For example, the following specification for a DIMENSION field results in a failure when the "Mth" field is used as a dimension in a visualization:
month(ModifiedDate) as Mth