Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate the amount of sales to new customers per week

I'm trying to calculate the amount of sales to new customers per week. But at the moment I only get the total sales per week.

count(if(OrderType='Sale', ItemId))-count(if(OrderType='Refund', ItemId))

1 Reply
Not applicable
Author

Here's the full question again.

I'm trying to calculate the amount of sales to new customers per week. But at the moment I only get the total sales per week.

count(if(OrderType='Sale', ItemId))-count(if(OrderType='Refund', ItemId))

I have the CustomerId as a dimension and also CalendarWeekOfYear.

Preferably I would want to have something like CalendarWeekOfYear()-1 in the expression above.