Discussion Board for collaboration on QlikView Scripting.
below is the sample table
Load * INLINE [
i want to get thhe distinct count of column "no"
at script level i am using
let vvar = count(DISTINCT no);
trace >>> countof: $(vvar);
but log file show null
plz provide any solution for the same the required answer should be "9"
Go to Solution.
Try this way
LOAD * INLINE [
//Add this table for distinct count
count(DISTINCT no) as No
let vvar = Peek('No',0,'Cnt'); //And store in this variable
why we need to create a new table (i.e Cnt)?, why it is not possible with "count" command directly
You can easily get this done in the UI.
For script just Anand has provided a sample solution.
If manually you create the variable in the front end then you can easily achieve with expression
vvar = count(DISTINCT no);
But in load script you have to refer the table directly.
That is from UI