Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
priyalvp24
Creator
Creator

Set analysis for today is not working

Hi All,

My date field is DocDate.

I want to calculate the total Deliveries for today.

My set expression is

Sum({<DocDate={'=$(=Date(Today()))'}>}Delivered_Quantity)

example: Total Delivered Quantity 7000

Delivered Quantity for today 500

 

It giving me the result as Total Delivered Quantity till today i.e. 7000 but i want result for today i.e. 500 

 

 

Please help.

Regards,

Priyal

 

 

 

1 Solution

Accepted Solutions
shiveshsingh
Master
Master

Hi

Try this.

 

Script:

 

T:
LOAD Date,
Date(floor(Date),'DD/MM/YYYY') as Date_N,
Delivered_Quantity,
Status
FROM
[C:\Users\XYZ\Desktop\Dummy Data.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

 

Your expression in text box :

=sum({<Date_N = {"$(=Date(Today(),'DD/MM/YYYY'))"}>}Delivered_Quantity)

View solution in original post

8 Replies
thannila
Creator
Creator

can you please attach the sample data?

 

Ivan_Bozov
Luminary
Luminary

Make sure that the DocDate format is the same as the one defined in your Main script section, e.g. DD.MM.YYYY. 

You can use the Date function in the set analysis to adjust this, e.g.

Date(Today(), 'DD.MM.YYYY')

Also use double quotes in the set analysis as this is a search string. 

priyalvp24
Creator
Creator
Author

PFA.

Chaurasiamit
Contributor
Contributor

Sum({<DocDate={"$(=Num(Date(Today())))"}>}QTY)

use this set analysis and make sure your  date is in NUM format.

QTY =Delivered_quantity 

priyalvp24
Creator
Creator
Author

sorry but not working

 

shiveshsingh
Master
Master

Hi

Try this.

 

Script:

 

T:
LOAD Date,
Date(floor(Date),'DD/MM/YYYY') as Date_N,
Delivered_Quantity,
Status
FROM
[C:\Users\XYZ\Desktop\Dummy Data.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

 

Your expression in text box :

=sum({<Date_N = {"$(=Date(Today(),'DD/MM/YYYY'))"}>}Delivered_Quantity)

View solution in original post

priyalvp24
Creator
Creator
Author

Thanks,its working....
shiveshsingh
Master
Master

Glad to know it helped