Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon, I need you to help me solve this problem:
I need to show only sales with zero value of the current month and then compare it with the sales average of the last 3 months.

Think so,
Current month Sales with zero value
Sum({$<Sales = {'0'}, Month={'$(=Month(max(Date)))'}>}[Sales])
Previous 3 months sales:
=Sum({<Sales = {'0'}, Date={">=$(=MonthStart(AddMonths(Max(Date),-3)))<=$(=MonthEnd(AddMonths(Max(Date),-1)))"}>}Sales)
Thanks for answering he resolved the current month and last 3 months, now the problem is that I have to put myself in the dimension of the same condition and that I show the clients with zero sales I am using a function but something I am doing wrong.
Current month ---> ok
SUM({$<[SALES]=0,[FECHA_PROCESO.autoCalendar.Date]=
{'>=$(=AddMonths(Today(),-1))<=$(=AddMonths(Today(),+1))'}>}SALES)
Previous 3 month sales ---> ok
SUM({$<[FECHA_PROCESO.autoCalendar.Date]=
{'>=$(=AddMonths(Today(),-4))<=$(=AddMonths(Today(),-1))'}>}SALES/3)
Dimension --- not working
=if( aggr((SUM({$<[SALES]=0,[FECHA_PROCESO.autoCalendar.Date]=
{'>=$(=AddMonths(Today(),-1))<=$(=AddMonths(Today(),+1))'}>}SALES)),NOMBRE_CLIENTE)=0, NOMBRE_CLIENTE,'Otros Clientes')

You created your expression like this, Your setting the Aggr value with zero, may be that is causing the issue.
=If(Aggr(Sum({<Sales=,Date=>}),Nombre_Cliente)=0,Nombre_cliente,'Otros Clientes')
Try to change your expression like these....
=If(Count(Aggr(Sum({<Sales=,Date=>}),Nombre_Cliente))=0,Nombre_cliente,'Otros Clientes')
Or
=If(Min(Aggr(Sum({<Sales=,Date=>}),Nombre_Cliente))=0,Nombre_cliente,'Otros Clientes')
Or
=If(Avg(Aggr(Sum({<Sales=,Date=>}),Nombre_Cliente))=0,Nombre_cliente,'Otros Clientes')
Not working ![]()
Try this way with the if inside the aggr
=aggr(
IF( SUM({$<[SALES]=0,[FECHA_PROCESO.autoCalendar.Date]=
{'>=$(=AddMonths(Today(),-1))<=$(=AddMonths(Today(),+1))'}>}SALES)) = 0, NOMBRE_CLIENTE,'Otros Clientes')
,NOMBRE_CLIENTE)