Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the follow formula to bring the new customer (clients who bought products in 2024 but didn´t in past years) without anyfilters it works correctly, however when I applied sales area filter and select for example xyz sales area it shows some customer as new one but it is wrong because some customer bought product in the sales area ZZZ in 2022 but in XYZ in 2024. In conclusion, I need to show the new customer based in the field "CUSTOMER" that´s mean if I select XYZ filter or whatever this kind of filter doesn´t need to affect the result.
Count({<CUSTOMER=e({<Year_Calday={">=$(=FirstSortedValue(Year_Calday, Year_Calday))<=$(=Year(Today())-1)"}>})>*<CUSTOMER={"=(Sum(Sales)>0)"}>} distinct CUSTOMER).
Thank you in advance
This formula will count distinct customers who made purchases in 2024 but did not make any purchases in previous years, regardless of the SALES_AREA selected.
Count(
{
<Year_Calday={"2024"},
CUSTOMER = e(
{<Year_Calday={"<=$(=Max(Year_Calday)-1)"},
SALES_AREA=>}
),
SALES_AREA= // This will ignore the SALES_AREA selection
}
DISTINCT CUSTOMER
)
Hi @AN2024,
Check this:
Count(
{
<Year_Calday={"2024"},
CUSTOMER = e(
{<Year_Calday={">=$(=FirstSortedValue(Year_Calday, Year_Calday))<=$(=Year(Today())-1)">},
SALES_AREA=>}
),
SALES_AREA= >
}
DISTINCT CUSTOMER
)
******Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.********
Check this one :
Count(
{<
Year_Calday = {"2024"},
CUSTOMER = e(
{<
Year_Calday = {">=$(=FirstSortedValue(Year_Calday, Year_Calday))<=2023"},
SALES_AREA => // Ignore sales area selection for past years
>}
)
>} DISTINCT CUSTOMER
)
or
Count(
{<
Year_Calday = {"2024"},
CUSTOMER = e({<
Year_Calday = {">=$(=Max(Year_Calday) + 1)<2024"},
SALES_AREA = p() // Preserve current selection of SALES_AREA
>})
>} DISTINCT CUSTOMER
)
// Please provide sample data to validate the expression, or use the provided expression as a reference to resolve your issue.
*****Hope these steps will help you to resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.******
It looks like a syntax error. Try to remove the marked '>' symbol in the screenshot.
@TauseefKhan This is a sample of the result, if I filter for X73 (Sales zone) it counts as new customer because there are not sales for the past year for this customer in the sales zone X73, nevertheless, that is wrong because I need to take in count a new customer only if they bought a product in the current year considering all sales zone and they didn´t buy a product in the past years, for example in this case the customer ID is not a new customer, because it bought a product in the sales zone X71 in 2022.
Sales zone | Date | Sales | CustomerID |
X71 | 23/03/2022 | 3 | 13348 |
X73 | 29/05/2024 | 1 | 13348 |
Thank you, it brought a result removing the symbol ">" but unfortunately it is wrong as I explained to TauseefKhan:
"This is a sample of the result, if I filter for X73 (Sales zone) it counts as new customer because there are not sales for the past year for this customer in the sales zone X73, nevertheless, that is wrong because I need to take in count a new customer only if they bought a product in the current year considering all sales zone and they didn´t buy a product in the past years, for example in this case the customer ID is not a new customer, because it bought a product in the sales zone X71 in 2022."
Sales zone | Date | Sales | CustomerID |
X71 | 23/03/2022 | 3 | 13348 |
X73 | 29/05/2024 | 1 | 13348 |
This formula will count distinct customers who made purchases in 2024 but did not make any purchases in previous years, regardless of the SALES_AREA selected.
Count(
{
<Year_Calday={"2024"},
CUSTOMER = e(
{<Year_Calday={"<=$(=Max(Year_Calday)-1)"},
SALES_AREA=>}
),
SALES_AREA= // This will ignore the SALES_AREA selection
}
DISTINCT CUSTOMER
)
Thank you for your help.