Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pauledrich
Creator
Creator

Sum of sales (Today) (This Week) & (This Month)

HI and thanks in advance...

I am using this expression for a dashboard that will give sales for today for the item FurryFlipFlops which doesnt appear to work - any ideas where I am going wrong?

=sum({<Date = {'$(=Date(today()))'} >}{<CategoryID={'$(=FurryFlipFlops} >} Sales)

I also want to do the same for sales so far this week until Sunday and another for Sales this month.

For this month I have:

sum({<Year={$(=Year(today()))},Month={'$(=upper(Month(today())))'}>}{<CategoryID={'$(=FurryFlipFlops} >}Sales)

P

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps this: =sum({<Date={'$(=Date(today(),'DD/MM/YYYY'))'}, CategoryID={'FurryFlipFlops'} >} Sales)

If not please post an example document: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Not applicable

The expression should be:

=sum({<Date = {$(=Date(today()))}, CategoryID={$(=FurryFlipFlops)} >} Sales)

You only have to close the set analysis brackets once, and you can put many conditions using commas. Also (although I think it would also work), you only have to use the apostrophe when the set analysis condition is > or <.

pauledrich
Creator
Creator
Author

Thank you - I understand my mistake with the {}, I have tried

=sum({<Date = {$(=Date(today()))}, CategoryID={$(='FurryFlipFlops')} >} Sales)

with a re-load with no data showing?

I have double checked that data is present and all okay..... I have changed "Date" to "TransactionDate" within the script as:-

TransactionID,

    Date(Floor(TransactionDate),'DD/MM/YYYY') as Date,

    TransactionDate,

    MonthName(TransactionDate) as Month,

    Month(TransactionDate) as Month1,

    Year(TransactionDate) as Year,

Gysbert_Wassenaar

Perhaps this: =sum({<Date={'$(=Date(today(),'DD/MM/YYYY'))'}, CategoryID={'FurryFlipFlops'} >} Sales)

If not please post an example document: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand