Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date field with format D-M-YYYY hh:mm:ss
I want to count the number of employees who have september as first month of appearance
I tried count({<month(min(datefield))={9}>} employeenumber) .
Instead of {9} i tried {'sep'} and {'9'} too but I don't get the correct results.
Is it not possible to use the min and month function this way ?
Try this?
=count(Distinct {<employee={"=month(min(changedate2))='sep' "}>} employee)
in the script editor by default SET DateFormat='M/D/YYYY'; will be there but your format is diffrent
change it to SET DateFormat='D/M/YYYY'; OR SET DateFormat='D-M-YYYY';
Hopefullt it will work if your expression is correct as per your filed name .
regards
Pradosh
Try like:
count(Distinct {<datefield={"=Month(Min({1} datefield))='Sep' "}>} employeenumber)
Qlik interprets my datefield correct. Tried it with date#(datefield, 'D-M-YYYY') too
However I get "Error in set modifier expression" with a red line below the { of {9}
I would do this and try
count({<'month(min(datefield))'={9}>} employeenumber)
use distinct if needed.
regards
Pradosh
did it work?
Pradosh,
In set analysis, LHS of '='; a modifier has to be a script generated field name rather than expression.
No, this did not work either. I get a wrong result. It counts every lowest datevalue.
hi tresesco
i understand that but if he is using a function it should be enclose between single quotes and it is even working for me. please correct me if i am wrong but is it a wrong practice or not at all allowed is Qlik?
Regards
Pradosh
post a sample and lets try with that.
regards
Pradosh