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

Show last 15 days sales in a bar chart

HI,

I want to show the sales in a bar chart for last 15 days.

I used below dimension 

=date(date(floor(DATE)),'MM-DD')

and expression,

=sum({$<DATE={"=DATE>=Max(total DATE)-15"}>}SALES)

all the data shows correct values but the 1st day sum is incorrect.

Please help me, what is the wrong of this expression?

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Change your expression to :

=sum({$<SALESDATE={"=SALESDATE>=Max(total Floor(SALESDATE))-15"}>}SALES)

View solution in original post

15 Replies
VishalWaghole
Specialist II
Specialist II

Hi Anuradha,

Please try this,

=sum({$<DATE={">=Max(total DATE)-15"}>}SALES)

- Regards,

Vishal Waghole

anuradhaa
Partner - Creator II
Partner - Creator II
Author

No, that doesn't work

anuradhaa
Partner - Creator II
Partner - Creator II
Author

simply what i need to show is sales values of last 15 days.

Not applicable

Try this ..


Sum({$<DATE= {1(=Max(DATE)-15)}>}SALES)


Thanks,

Prabhu

anuradhaa
Partner - Creator II
Partner - Creator II
Author

No, that is not working.

Could you please help me to solve my problem, how to display a bar chart that contains sales values of last 15 days.

IF you can find an answer instead of my expression that is ok. please help me.

Thanks

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Could you please help me to solve my problem, how to display a bar chart that contains sales values of last 15 days.

IF you can find an answer instead of my expression that is ok. please help me.

Thanks

MK_QSL
MVP
MVP

Vishal's solution should work.

If it is not working, means problem in Date format...

you can use as below...

SUM({$<DATE = {">=$(=Date(Max(Total DATE),'MM-DD')"}>}Sales)

considering that your DATE format is MM-DD.

If it is MM-DD-YYYY you can change accordingly.

Hope this helps...

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Hi this is what i have in my dimension

=date(date(floor(TURNED_ON_DATE_TIME)),'MM-DD')

and i have changed expression according to you , but doesn't work.

Thanks

MK_QSL
MVP
MVP

Can you share your sample data file or apps?