Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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
MVP
MVP

Re: Sales Today expression

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)

17 Replies
techvarun
Valued Contributor II

Re: Sales Today expression

Try this

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

arvind_patil
Valued Contributor II

Re: Sales Today expression

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

Re: Sales Today expression

How do I check my "date format"?

antoniotiman
Honored Contributor III

Re: Sales Today expression

Hi Fredrik,

try this

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

Regards,

Antonio

Not applicable

Re: Sales Today expression

I still get the whole year of sales somehow.

MVP
MVP

Re: Sales Today expression

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

Re: Sales Today expression

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

antoniotiman
Honored Contributor III

Re: Sales Today expression

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

stabben23
Honored Contributor

Re: Sales Today expression

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