Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

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

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

Not applicable

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

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%

MVP
MVP

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

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

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

Is it OK?

screenshot.png