Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
what is the count() function ? and how can i use this ? explain me pls........................
I suggest looking at the Help file or reference manual or searching the forum.
Simply is an aggregation function that counts the numbers of items under a certain condition
E.g.: Count(Customers)
Count(distinct Customers)
You can use Count() in script or in expression and in the last you can add set analysis
Hi Sandeep,
Count()
This function returns the count of an expression over a number of records in business data as defined by a group by clause. If the distinct occurs before the expression, all duplicates will be discarded.
Syntax
count([distinct ] expression | * )
Example
Load Month, count(Sales) as NumberOfSalesPerMonth from abc.xls group by Month;
Load Month, count(distinct Customer) as CustomerBuyingPerMonth from abc.xls group by Month;
LoadMonth, count(*) as NumberOfRecordsPerMonth from abc.xls group per Month;
Type of Count function:
NumericCount()
TextCount()
NullCount()
MissingCount()
Please go through below link
Thanks
Hi
Count():
Returns the aggregated total count of values from expression or field iterated over the chart dimension(s).
For this function it is allowed to use the distinct qualifier in combination with the total qualifier This combination is not valid for any other aggregation functions.
Examples:
coung(Sales)
count(Price*Quantity)
count(distingct Price)
count(Sales)/count(total Sales) returns sales within the selection
Thanks
Hello Sandeep,
It s part of the Aggregation function. the basic use would be to count how many times something happen in a list.
For example, i am dealing here with hotel packages (forfait) and with the following expression, i would ask Qlikview
Everytime, you have 'Forfait' a in the column Type_Forfait, you count the value in the column Unit
=count({<Type_Forfait={'Forfait'}>} Units)
The official definition is : Returns the count of expression over a number of records as defined by a group by clause. If the word distinct occurs before the expression, all duplicates will be disregarded.
Pay attention also to the function called DISTINCT very important for that kind of activity.$
If you need more help, please provide me with some détails.
Attached, the visual use of my expression. The column "NOMBRE" returns the number of package.
Best
JP
thanks for everyone
You are welcome, you can then close the case have a nice day.