Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm really new in Qlik
I just want to count only item that already end of warantee
I use KPI chart with below expression , [tIVT.endWarantee] is date in value.
=Count({<date([tIVT.endWarantee],'DD/MM/YYYY')={"$(='>'&today())"}>} [tIVT.Item])
Could someone suggest me for this case please?
@CTH2022 See what I have done using your data. First I converted the WarrentENDDate to proper date format show like below:
NoConcatenate
Temp:
Load ITemNo,Date(WarrentyEndDate,'MM/DD/YYYY') as WarrentyEndDate
Inline [
WarrentyEndDate, ITemNo
43019,1
43044,2
43077,3
43174,4
43343,5
43454,6
43456,7
44766,8
44765,9
44768,10
44769,11
];
Exit Script;
In the above I have 2 Dates that I greater than today.
In the Front end I used the below expression and it gave me right result.
Count({<WarrentyEndDate={">=$(=Today())"}>}ITemNo)
If this does not resolve your issue, please let me know.
@CTH2022 It should be just as below expression:
count({<[tIVT.endWarantee]={">=$(=today())"}>}[tIVT.Item])
Adjust the [tIVT.endWarantee] date format to 'DD/MM/YYYY' in the script itself
If this resolves the issue please like and accept it as a solution.
I try as suggestion it's look better than my expression which return "-".
But above expression always retun "0" even I try, > , < , =
@CTH2022 Could you please tell in which format is your [tIVT.endWarantee] date?
Sometimes the difference in date format could also result in such things.
Or if you can provide me some sample data, I can clear your issue rightaway.
My date is date value as shown in table chart.
@CTH2022 See what I have done using your data. First I converted the WarrentENDDate to proper date format show like below:
NoConcatenate
Temp:
Load ITemNo,Date(WarrentyEndDate,'MM/DD/YYYY') as WarrentyEndDate
Inline [
WarrentyEndDate, ITemNo
43019,1
43044,2
43077,3
43174,4
43343,5
43454,6
43456,7
44766,8
44765,9
44768,10
44769,11
];
Exit Script;
In the above I have 2 Dates that I greater than today.
In the Front end I used the below expression and it gave me right result.
Count({<WarrentyEndDate={">=$(=Today())"}>}ITemNo)
If this does not resolve your issue, please let me know.
This sloved!!!
Prepare date value in proper date format before compare with today().
Many thanks.