Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My SQL Query: select A,B,count(1) from bala;
i written in qlikview like
Load A,B,count(1) from bala.qvd;
is it correct ?
any function there in qlikview for my sql COUNT function
You can use Count(1) in QV
Load A,B,count(1) from bala.qvd Group by A,B;
Count() function is available in Qlikview
Since, its an Aggregate function so you need to use Group By clause.
eg.
Main_Table:
Load
A, B
Count(Distinct Value) AS New_Value
From Table.......
GROUP BY A,B;
Regards
Av7eN
Hi,
What out out get when using mysql query that is select A,B,count(1) from bala; let me knwo
And in Qlikview you can use same but need to use Group By by all dimension in table
Load
A,B,
count(1) from bala
Group By A,B;
Regards
Anand
Hi,
Try like this
Load A,B,
count(A) AS Count
from bala.qvd
Group by A,B;
Regards,
jagan.
bala:
LOAD * INLINE [
sno, name
1, a
2, b
3, c
4, d
5, e
];
b:
LOAD sno,name,count(sno)
Resident bala Group by sno,name;
drop table bala;
in qlikview iam getting count '1'
but in my sql count '5'
i have tried like count(1),count(name),count(sno),count(sno&name)...but same result in qlikview '1'
now check and tell me...
bala:
LOAD * INLINE [
sno, name
1, a
2, b
3, c
4, d
5, e
];
b:
LOAD sno,name,count(sno)
Resident bala Group by sno,name;
drop table bala;
in qlikview iam getting count '1'
but in my sql count '5'
i have tried like count(1),count(name),count(sno),count(sno&name)...but same result in qlikview '1'
now check and tell me...
If Nulls are present in A, then Count() ignores that row
Set NullInterpret='';
Load A,B,Count(1),Count(A) Group by A,B;
Load * Inline [
A,B
1,1
1,1
1,2
,3 ];
Do you have duplicates in Mysql table?
It will definitely give you '1' as the output, since you are grouping it by sno and name, which will uniquely count each row in this case since you do not have any duplicates in this.
You have to use SUM up this count in Front End charts to show or in the script create a separate table for counts:
counttable:
LOAD count(sno) as cnt
Resident bala;
Hope this was helpful.
Thanks,
Singh