Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I’m trying to show unique customers per quarter for the last 5 years. The expression works well when no year selection is made. But when year is selected, it hides few customers and the total count varies.
E.g.: Customer “AIEAJKI” is a unique customer in 2015 (Direct/Product) and 2017 (Direct/Services). The report displays it when no year selection is made. But when I select 2015, it disappears from the report. Also, I would like the chart to show data only for the last five years. When I select 2013 or prior years, it shouldn’t display any data. Why does that happen? Maybe, I’m missing something in my expression. Attached is my sample dataset. Any help is appreciated.
Here is my expression:
Sum(Aggr(If(Customer.Mth_Year = Min({1<Date={">=$(=YearStart(Max(Date), -4))<=$(=Date(Max(Date)))"},Customer.QTR=,Customer.Month=,Customer.Year>}TOTAL <[Direct/Indirect Customer],Segment,[Direct/Indirect Customer Name]> Customer.Mth_Year), 1, 0), Direct/Indirect Customer],Segment,[Direct/Indirect Customer Name], Customer.Mth_Year))
Thanks!
May be try this
Sum(Aggr(If(Customer.Mth_Year = Min({1<Date={">=$(=YearStart(Max({1}Date), -4))<=$(=Date(Max({1}Date)))"}, Customer.QTR, Customer.Month, Customer.Year>} TOTAL <[Direct/Indirect Customer], Segment, [Direct/Indirect Customer Name]> Customer.Mth_Year), 1, 0), [Direct/Indirect Customer],Segment,[Direct/Indirect Customer Name], Customer.Mth_Year))
May be try this
Sum(Aggr(If(Customer.Mth_Year = Min({1<Date={">=$(=YearStart(Max({1}Date), -4))<=$(=Date(Max({1}Date)))"}, Customer.QTR, Customer.Month, Customer.Year>} TOTAL <[Direct/Indirect Customer], Segment, [Direct/Indirect Customer Name]> Customer.Mth_Year), 1, 0), [Direct/Indirect Customer],Segment,[Direct/Indirect Customer Name], Customer.Mth_Year))
Thanks Sunny. It's working as expected 🙂