Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Darrenkeirl
Contributor
Contributor

Rolling 14 days data

Can someone help me please.

i am trying to generate a graph in qlilview that shows the last 14 days with of data on a daily basis (ie there will be 1 bar for each day for the last 14 days)

please could someone help me the the correct set analysis expression to write

35 Replies
Darrenkeirl
Contributor
Contributor
Author

Morning Vamsee

Thanks for you help. I am still getting issues however I maybe mis-understanding your advice.

Regarding the statement 

=Date(Date#(Max(CalendarDay), 'DD'), 'DD')

are you advising me to put this expression into the table box? 

Darrenkeirl
Contributor
Contributor
Author

Good afternoon Vamsee
I think this might be beyond my capabilities as I cannot seem to get the
expression to do as I would like.
Is there a way if me sharing with you the report I am trying to create?
vamsee
Specialist
Specialist

Hi Darren, 

Yeah, I was suggesting you try that in a table box. You can post that qvw here. If you are concerned about sensitive data you can try the following options and then post 

Scramble and Reduce 

Darrenkeirl
Contributor
Contributor
Author

Hi Vamsee

I have added to text box and got the result '30'

Regarding posting qvw. can you advise how I do this please?

 

Darrenkeirl
Contributor
Contributor
Author

Hi 

 

I have just tried the 2nd expression again and noticed that this does work as long as I also select the Year and Month however if I remove these selections then it inflates the figure as I believe it is adding up all of the calendar days for each month/year available.

Is there a way of 'hard coding' this expression where is simple shows only the last 14 days information

vamsee
Specialist
Specialist

Click on reply and just drop your qvw here.

As I mentioned earlier, if you have data for more than one month change all the expressions suggested to "Date_Field" 

Darrenkeirl
Contributor
Contributor
Author

I dont appear to be able or permitted to attach the qvr file.

I have tried the last suggestion however this has not resulted in the correct out come.

I am attached some screen shots which might help?

vamsee
Specialist
Specialist

According to the screenshots shared, you are still using CalendarDay which has day values i.e. 1,2,3,4

My suggestion is to find the column which is the complete date field, like 

07/01/2020, 07/02/2020 etc

Darrenkeirl
Contributor
Contributor
Author

my fault. Please find attached correct screen shots.

The 1st batch is using the 1st expression you suggested with CalendarDay replaced with Date.

The 2nd group is the 2nd expression group also with CalendarDay replaced with Date (i have only updated the expression so only 2 pictures as everything else stays the same)

I have also screen shot the graph to demonstrate what it looks like

Darrenkeirl
Contributor
Contributor
Author