Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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)
))
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?
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?
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.