Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to calculate buyers that haven't purchased in the last 6 months across each month.
I've attached a chart that I am trying to produce in Qlikview. Ignore the lines. If you just look at the lost (red) bars for the moment, that is what I am trying to create.
Below are the fields I'm trying to use in the expression,
Unit.Sold_Date
Buyer.B_No
and my dimension is,
Unit.Sold_Month
So far I have
if(
max(UNIT.SOLD_DATE)
>
max(addmonths(today,-6)), count(BUYER.B_NO)), count(Buyer.B_No))
However this will only show buyers that have bought within the last 6 months and not across all months.
Any help will be very much appreciated.
Thanks
Gareth
Provide sample data to work !
Unfortunately I cannot attached any sample data.
My Script is two tabs the first is -
LOAD | |
%_BNO,
UNIT.SOLD_MONTH
FROM
[$(QVD_Path)\BUYER_unit.qvd] | ||
(qvd); |
and the second is -
LOAD
%_BNO,
if(max( UNIT.SOLD_MONTH > AddMonths(UNIT.SOLD_MONTH,-3)), %_BNO) as BUYER.ACTIVE
FROM
[$(QVD_Path)\BUYER_unit.qvd]
(qvd)
GROUP BY %_BNO;