Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sales Today expression

Hello,

I've been trying to set an expression that locks my sales for today. But after going through these forums and youtube and guides I can't seem to get it to work.

What I need is todays sales numbers in the Business area "Stores" which is called Affärsområde.

This is what I got right now,

sum({<Date={'$(=Date(Today(),'DD/MM/YYYY'))'}, Affärsområde={'80 BUTIK'} >} TB)

TB = Sales

Affärsområde = All the stores we got

HEEEELP!

1 Solution

Accepted Solutions
sunny_talwar

Well, I assumed that your date field is called date... but yes, if it is called datum, then try this

Sum({<Datum={"$(=Date(Today(),'YYYYMMDD'))"}, Affärsområde={'80 BUTIK'} >} TB)

View solution in original post

17 Replies
techvarun
Specialist II
Specialist II

Try this

=Sum({<Date={'$(=Today())'}, Affärsområde={'80 BUTIK'} >} TB)

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Fredrik,

Kindly check  your date format and try to like below:

sum({<Date={'$(=Date(Today(),'DD/MM/YYYY'))'}, Affärsområde={"80 BUTIK"} >} TB)


Thanks,

Arvind Patil

Not applicable
Author

How do I check my "date format"?

antoniotiman
Master III
Master III

Hi Fredrik,

try this

sum({<Date={"$(=Date(Today(),'DD/MM/YYYY'))"}, Affärsområde={'80 BUTIK'} >} TB)

Regards,

Antonio

Not applicable
Author

I still get the whole year of sales somehow.

sunny_talwar

Just like antoniotiman‌ pointed out, you need double quotes around the whole Date(Today(), ....) thing. The reason for this is because you have single quotes around your date format and single quotes around single quotes confuses QlikView into thinking that the starting single quote around your date format is the end of the first single quote.... to avoid this, you can use Escape sequences, but what Antonio has pointed out is a better option for you here.

Not applicable
Author

Well I tried what Antonio said and it still replied with the numbers for the "Year" and not todays sales.

antoniotiman
Master III
Master III

Are You sure your Date field is formatting  DD/MM/YYYY ?

stabben23
Partner - Master
Partner - Master

Hi Fredrik,

I dont know Your chart, but try Your Expression inside a pivot/straigt table.

Dont use a label on the Expression, just the Expression. Then hover over the header in chart, you will then see if you have correct dateformat. Test until you got correct format.

hover.png