Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I am using mode() as follows but error is showing invalid expression.
Please help.
-----------------------------
Directory;
LOAD Id,
StartDate,
EndDate,
Country,
Type,
Sub_Type,
Name,
Killed,
Injured,
Year,
ModifiedTime,
mode(Name) as CommonName
FROM
[Disaster_Data\Copy of Disaster.xlsx]
(ooxml, embedded labels, table is Disaster) Group By Name ;
Thnks
Hi Nikhil,
In your script you have added "Name" only in group by function.
whenever you are using group by function you have to add all the fields which you have used in load script.
-Sathish
mode works in script and you can group by reading from an excel
you have to group by for all the fields without an aggr function
load c1, c2,
mode(Name)
FROM a.xlsx (ooxml, embedded labels, table is a)
group by c1, c2;
load c1 as c1new,
mode(Name)
FROM a.xlsx (ooxml, embedded labels, table is a)
group by c1;
Without using group by
Table:
LOAD Id,
StartDate,
EndDate,
Country,
Type,
Sub_Type,
Name,
Killed,
Injured,
Year,
ModifiedTime
FROM
[Disaster_Data\Copy of Disaster.xlsx]
(ooxml, embedded labels, table is Disaster) ;
Left Join(Table)
Load mode(Name) as CommonName Resident Table;
Hey,
THanks but is this constraint for group by in QLikview only ?? Becoz as far as i know no such constraint in sql....
You have same constraints in Sql which can be avoided by using Analytic functions
Hi Konstantins,
We can use aggregation function with excel files
-Sathish