Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Months with no sales

Hi

I would like to create a chart which shows on a month by month basis which customers have not brought anything that month.

I am not sure what is the best way to go about this.

Thanks

Andy

8 Replies
v_iyyappan
Specialist
Specialist

Hi,

Can you post a sample file because we need clarify the ur requirements?  if am guess it like this

=count({<month={"=Count(Customer)<0"}>}custcount)

Regards,

MK_QSL
MVP
MVP

Create a Pivot Chart with below

Dimension 1 : =if(Aggr(SUM(OrderValue),[Customer Name],OrderMonth)<0,[Customer Name])

//This is a Calculated Dimension

Dimension 2 : OrderMonth

Expression SUM(OrderValue)

Not applicable
Author

That didn't seem to work, it just showed a count of the orders each month.

I have attached a qvw file to post

Thanks

Andy

Not applicable
Author

Dimension: OrderMonth

Exp: if((if(count([Customer Name])>0,0,1))=1,[Customer Name])

v_iyyappan
Specialist
Specialist

Hi,

PFA,

hope its help.

Regards,

Not applicable
Author

You need to create a flag.

IF(Previous(CustomerId)=CustomerID, 0, 1) as NewCustomer

the table should be ordered by customerID and orderdate/purchase date ASC

The flag will help you in identifying new/ old customers

sujeetsingh
Master III
Master III

Hi ,

Here is a modification i have done to the code of your sample

Sales:

LOAD * INLINE [

Month, Customer, Value

Jan, C001, 10

Jan, C002, 20

Feb, C002, 30

Mar, C001, 40

];

Months:

LOAD * INLINE [

Month,

Jan,

Feb,

Mar,

Apr,

May

];

FactCalculation:

LOAD

Month, Customer, Value ,

if(Value=null() or Value=0,1,0) as NoCount

Resident Sales;

DROP Table Sales;

i have used a flag and named it NoCount.

Now you can easily create a graph with month as Dimension and Expression as sum(NoCount)

Here is the sample attached.

er_mohit
Master II
Master II

try in chart or pivot table

add dimension month

expression sum(if(Sales<0,Sales))

in presentation tab uncheck on show zero value

then you 'll see