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: 
Not applicable

How to compare current 7 days that have values with previous 7 days and receive % growth or number.

I need script grab last 7 days which have values, found average for transaction in this period (for this purpose I'm using - Sum(points)/Count(distinct cash_table_id & '|' & salescript_group_name)    )   than take previous 7 days, make the same calculations and return the difference in percents or some numbers.

Thank you!

4 Replies
sunny_talwar

Would you be able to share some sample data with your expected output?

Not applicable
Author

Unfortunately not, I can explain more precisely what am I expecting.

I have some waiters in the restaurant, they are receiving points when selling some definite group of products together.

For sure they have shifts during the week, so there will be some missing days in a calendar week for every waiter.

Sum(points)/Count(distinct cash_table_id & '|' & salescript_group_name) - this expression counts avr points for waiter taking into account data from one closed table. There're plenty of closed tables during the shift for sure.

So to compare progress of a waiter during the time I want to pick last 7 days he was working and then compare them with previous 7 days.

The output should be total average for last 7 days divided by total average for previous 7 days with some percentage result like +/- n%

sunny_talwar

All I am asking for some made up data. If I make some data up for your scenario, then it may or may not match your original data. If you can provide few lines of made up data with what you would like to see, one of us on the community may be able to help you better.

Not applicable
Author

Is it OK?

screenshot.png