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: 
sonysree88
Creator II
Creator II

4 previous dates data and hours wise data

Hi Group,

Could you please give me the solution to the below task

Actually i have one filter like day (in listbox) based on that chart can change and i should get previous 4 dates..for example if  i can select april 10th in day field i should get the data for these dates apr9th,apr8th,apr7th apr6th

Capture.PNG

and one more question is : for eg i have sales data but i need sales per hour on apr09th

help me on the both the questions please

11 Replies
swuehl
MVP
MVP

To limit your date range, maybe something like

=Sum(

{<Date = {">=$(=Date(Max(Date)-4,'YourDateFieldFormat))<$(=Date(Max(Date),'YourDateFieldFormat'))"}>}

Amount)

See also

Dates in Set Analysis

I haven't really understood your second request, maybe add a Hour field to your dimensions?

sonysree88
Creator II
Creator II
Author

Thanks for reply ,i tried its not working still facing issue to get the previous dates and sales per hour wise

Let me know any another solutions

sunny_talwar

I would think that what Stefan provided should work for you, do you have a sample where you can show what is not right

Best,

Sunny

sonysree88
Creator II
Creator II
Author

Here am using Orderdate in date field

=Sum(

{<Date = {">=$(=Date(Max(Date)-4,'YourDateFieldFormat))<$(=Date(Max(Date),'YourDateFieldFormat'))"}>}

Amount)

Note: Date filed is date with time stamp can you give me the syntax like above with time stamp format date

swuehl
MVP
MVP

You can just use Timestamp() formatting function (well,basically Date() will work the same also) and an appropriate format code:

On Format Codes for Numbers and Dates

sonysree88
Creator II
Creator II
Author

Previous date are coming now but data is not correct means

for each date data is coming as same ( there is no difference)

swuehl
MVP
MVP

Could you upload a small sample QVW?

Or describe in detail what dimension(s) and expressions you are using in that chart, and how your data model with respect to these fields look like?

sonysree88
Creator II
Creator II
Author

Hi ,

Please find the screenshot and give me the solution previous.PNG

swuehl
MVP
MVP

The solution to what issue? I don't see that the results are the same as stated in your previous post.

And even if they were, I am unsure how I should help, still missing a more detailed description of the context and data model.