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

No of days...

Hi,

I have a problem in which i have to calculate no. of days according to  below logic.

(sales value of that particular month) / ( Sum(Sales value of trailing three months) / (total no. of days between that trailing three months))

For Example,

For  Apr 2014  no. of days =(sales value of Apr=40) /[ (Sales value of trailing three months =(jan+feb+Mar)=(10+20+30) / no.of days (jan=31+feb=28+Mar=31))].


Please help me regarding this.

Capture.PNG

5 Replies
senpradip007
Specialist III
Specialist III

Can you share sample qvw?

Anonymous
Not applicable
Author

hi Pradip,

i have share sample data so resolve the issue on that data only

Not applicable
Author

Hi,

Can you share your sample qvw file.

Thanks

Harshitha

Anonymous
Not applicable
Author

I tested the following expressing in a straight table  and a small inline table with first 5 of your months and it works

it gets the result for the last 3 months before the current month

Use the following expression

=rangesum(above(sum(Value),1,3))
/
rangesum(above(only(day(monthend(Date))),1,3))

Anonymous
Not applicable
Author

here is my table