Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikeers
Creator II
Creator II

New customers - line chart - set analysis

Is it possible to graph only new customers by month using broad transactional data (fact table plus dimension tables), without using the load editor and using only set analysis? A new customer is one who bought for the first time in a given month and has never bought anything before.

Labels (5)
1 Solution

Accepted Solutions
vighnesh_gawad
Partner - Creator II
Partner - Creator II

yes, it is possible in Qlik Sense using only set analysis. Check if this expression solve your query.

Count(
    DISTINCT
    Aggr(If(
            MonthStart(Min(TOTAL <CustomerID> TransactionDate))
            = MonthStart(TransactionDate),
            CustomerID
        ),
        CustomerID,
        MonthStart(TransactionDate)
    ))
Regards, Vighnesh Gawad
Connect with me on LinkedIn | GitHub

View solution in original post

6 Replies
vighnesh_gawad
Partner - Creator II
Partner - Creator II

yes, it is possible in Qlik Sense using only set analysis. Check if this expression solve your query.

Count(
    DISTINCT
    Aggr(If(
            MonthStart(Min(TOTAL <CustomerID> TransactionDate))
            = MonthStart(TransactionDate),
            CustomerID
        ),
        CustomerID,
        MonthStart(TransactionDate)
    ))
Regards, Vighnesh Gawad
Connect with me on LinkedIn | GitHub
qlikeers
Creator II
Creator II
Author

Thanks, it seems to show the correct numbers after some adjustments.

I just have one more question: can this be written so that it works correctly also depending on the selection of different dimensions?

vighnesh_gawad
Partner - Creator II
Partner - Creator II

 

Can you expand on that? The current expression will work based on selections. Right now, it evaluates against the entire dataset, but when users select any dimensions, the expression will recalculate only for the selected data subset.

Do you want any specific behavior when someone clicks on a dimension?

Regards, Vighnesh Gawad
Connect with me on LinkedIn | GitHub
qlikeers
Creator II
Creator II
Author

Currently, the model looks like a star: there's a fact table (transactions) and several dimension tables, such as those for products and calendars.

I'd like it to calculate correctly regardless of the dimension I select in the filter. But I think it might actually work that way now that I think about it.

qlikeers
Creator II
Creator II
Author

How would you calculate:
1) Regular customers in the last 12 months? One who buys at least once in each of the last 12 months.

This can be done for both a single KPI and a line chart by month (for the last 12 months).

2) Lost customers in the last 6 months? They bought 7 months ago and haven't bought in the last 6 months.

This can be done for both a single KPI and a line chart by month (for the last 12 months).

Preferably, full months, not individual dates, although this is also an option.

vighnesh_gawad
Partner - Creator II
Partner - Creator II

Hi @qlikeers , it would be better to create a new thread for new questions and close this one by marking solution.

I think both of your KPIs should be possible with similar approach to my previous solution, but it may need a bit of testing and some additional thought.

Regards, Vighnesh Gawad
Connect with me on LinkedIn | GitHub