Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am new to QlikSense.
i have a data like below , from this i would like to arrange these Items in a Order at the top Expiry coming earliest.
Assume the data tody is 22/08/2020.
Can any one help/ suggest me how can i achieve in script.
Thanks,
Arjun
Hi @ArjunPrasad, you only need sum the two fields
Something like this:
Date(ManufacturingDate + ExpiryDays) as expirydate
If you need add months, the function it's addmonths()
this should resolve your question.
can you share the expected output from these data ?
Hi Taoufiq,
my expected output is like below.
Assume today date is "22.08.2020"
Thanks
Arjun
@ArjunPrasad You can do something like below
Data:
load Item,
ManufacturingDate,
if(floor(ManufacturingDate)< floor(today()),1,0) as _Flag
ExpiryDays
FROM table;
Now in your frond end chart you can put the expression using Flag
Assuming your measure is Sum(ExpiryDays) so expression will look like below
=Sum({<_Flag={1}>}ExpiryDays)
Hi Kush,
in Sql i have used below query to get expected Output(refer below screenshot)
Select *,DATEADD(D,ExpiryDays,ManufacturingDate) as expirydate
from Table1
order by DATEADD(D,ExpiryDays,ManufacturingDate)
Thanks
Arjun
Hi @ArjunPrasad, you only need sum the two fields
Something like this:
Date(ManufacturingDate + ExpiryDays) as expirydate
If you need add months, the function it's addmonths()
this should resolve your question.
Thank you @uroboros 🙂
Now i am got expected result in Qlik.