Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Something going wrong in my following script. Please tell me where it is wrong.
Data1:
LOAD Months,
Value,
MissingCount(Item) as CountOfMissingItem
FROM
(ooxml, embedded labels, table is Sheet1) Group By Months ;
------------------------------------------------------------------------------------------------------------------
Months and Item are Characters and Value are Numeric. In Item field i have put some values empty.
Thanks
The source table you have:

And you are counting missing value for Item(and not Value) field and they are missing at position for Months Mar and Apr. It is fine, I see.

Hi,
Remove group by clause
LOAD Months,
Value,
MissingCount(Item) as CountOfMissingItem
FROM
(ooxml, embedded labels, table is Sheet1) ;
Regards
ASHFAQ
Hi,
the no of field in load/select statement should included in group by clause.. so add Value in your Group by as
Group by Month, Value;
HTH
Sushil
You have to take all dimensions in the load (except for the one used in aggregation function) under group by clause like:
Group By Months, Value;
HEy,
Without GroupByClause , MissingCount will not work .
Hey,
IT works but i could not get what this MissingCount() function returns ??
I thought it will return numeric value(1 , 0) corresponding to other columns where values are missing.
Please explain.
If it is function then add other fields to group by clause.
if not then
Try below
LOAD
Months,
only(Value) as Value,
MissingCount(Item) as CountOfMissingItem
FROM
(ooxml, embedded labels, table is Sheet1) Group By Months ;
Regards
ASHFAQ
Hey,
I just want to know that if we have 'n' no of dimensions then in GroupByClause we have to take 'n-1' dimensions ??
Is it so ??
you can use only function as shown above to avoid adding dimension to groupby clause.
Regards
ASHFAQ
You are right, it returns numeric value. Issue could be somewhere else, like, an understanding-gap between your expectation and our understanding. Hence, try to share a sample data and explain the expected output.