Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Here is the link for the live dashboard according to which I want to show.
https://public.tableau.com/profile/lintao#!/vizhome/DigitalStrategyDashboard/ClientInsight
I have used the following measures.
New active clients?
var minSelectedDate to minx (ALLSELECTED (DimDate), DimDate [Date])
return
CALCULATE (
DISTINCTCOUNT (FactDigitalStrategy [ClientKey]),
FILTER (DimDate,
DimDate [Date]>? minSelectedDate
), USERELATIONSHIP (FactDigitalclientStrategy [new Date], Dim Date [DimDigitalStrategy] ))
New Active Customers (last 24 months)
VAR MaxFactDate?
CALCULATE (MAX (FactDigitalStrategy [Date]), ALL ('DimDate'))
VAR FDate (VAR FDate)
ENDOFMONTH ('DimDate' [Date])
VA Edate (VAR Edate)
EDATE (FDate, -24)
return
IF (
MaxFactDate < - MAX ('DimDate' [Date])
&& MaxFactDate> - Edate,
CALCULATE ([New active clients], ALL ('DimDate')) + 0
)
Active Customers (last n months) below the next part of the page of the next part of the
VAR page MaxFactDate?
CALCULATE (MAX (FactDigitalStrategy [Date]), ALL ('DimDate'))
VAR FDate (VAR FDate)
ENDOFMONTH ('DimDate' [Date])
VA Edate (VAR Edate)
CALCULATE (MIN (DimDate [Date]), ALL ( 'DimDate'))
return
IF (
MaxFactDate <- MAX ('DimDate' [Date])
&& MaxFactDate> - Edate,
CALCULATE ([Active Clients], ALL ('DimDate'))
) + 0
Solved! Go to Solution.
Vea si esto funciona para usted (disculpas ya que no aplico la codificación de color que tiene en su original):
1) Para calcular los nuevos clientes por mes:
New clients in month =
VAR PrevYM =
( MAX ( FactDigitalStrategy[Year] ) - 1 ) * 100
+ RIGHT ( SELECTEDVALUE ( FactDigitalStrategy[MonthYearNo] ), 2 )
VAR ActualClients =
VALUES ( FactDigitalStrategy[ClientKey] )
VAR PrevYearMonthClients =
CALCULATETABLE (
VALUES ( FactDigitalStrategy[ClientKey] ),
FILTER (
ALL ( FactDigitalStrategy ),
FactDigitalStrategy[MonthYearNo] = PrevYM
)
)
RETURN
COUNTROWS ( EXCEPT ( ActualClients, PrevYearMonthClients ) )
2) Para filtrar los objetos visuales en función de la selección en las segmentaciones de datos, creé una nueva tabla desconectada para los clientes nuevos y activos (y usé esta tabla para los objetos visuales)
3) Para filtrar los objetos visuales, creé una medida para usar en los filtros para los objetos visuales en el panel de filtro:
New client table (Filtered) =
IF (
SELECTEDVALUE ( '1 New client table'[MonthYearNbr] )
<= SELECTEDVALUE ( DimDate[MonthYearNbr] ),
1
)
Háganos saber si necesita más ayuda
Estoy adjuntando el archivo PBIX de muestra
Proud to be a Super User!
Paul on Linkedin.
Vea si esto funciona para usted (disculpas ya que no aplico la codificación de color que tiene en su original):
1) Para calcular los nuevos clientes por mes:
New clients in month =
VAR PrevYM =
( MAX ( FactDigitalStrategy[Year] ) - 1 ) * 100
+ RIGHT ( SELECTEDVALUE ( FactDigitalStrategy[MonthYearNo] ), 2 )
VAR ActualClients =
VALUES ( FactDigitalStrategy[ClientKey] )
VAR PrevYearMonthClients =
CALCULATETABLE (
VALUES ( FactDigitalStrategy[ClientKey] ),
FILTER (
ALL ( FactDigitalStrategy ),
FactDigitalStrategy[MonthYearNo] = PrevYM
)
)
RETURN
COUNTROWS ( EXCEPT ( ActualClients, PrevYearMonthClients ) )
2) Para filtrar los objetos visuales en función de la selección en las segmentaciones de datos, creé una nueva tabla desconectada para los clientes nuevos y activos (y usé esta tabla para los objetos visuales)
3) Para filtrar los objetos visuales, creé una medida para usar en los filtros para los objetos visuales en el panel de filtro:
New client table (Filtered) =
IF (
SELECTEDVALUE ( '1 New client table'[MonthYearNbr] )
<= SELECTEDVALUE ( DimDate[MonthYearNbr] ),
1
)
Háganos saber si necesita más ayuda
Estoy adjuntando el archivo PBIX de muestra
Proud to be a Super User!
Paul on Linkedin.
Please help to write a DAX.
Lo siento, no estoy entendiendo lo que está tratando de lograr con"Nuevos clientes activos". ¿Nuevo en comparación con cuándo?
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown necesito mostrar los "Nuevos clientes activos" desde la fecha mínima (que presentan de hecho o tabla de fechas) a la fecha máxima seleccionada desde Mes o año Slicer.
Para una mejor comprensión, este es el enlace para el panel en vivo según el cual quiero mostrar.
https://public.tableau.com/profile/lintao#!/vizhome/DigitalStrategyDashboard/ClientInsight
Lo sentimos si estoy siendo denso, pero normalmente whaen uno dice "Nuevos clientes activos", la idea es que estos son clientes que están activos (en el período) pero no estaban activos en otro período. Por ejemplo, nuevos clientes activos este año frente al año pasado (que serían clientes que no estuvieron activos el año pasado).
Mencionas un período, pero no cuando consideras que un cliente es "Nuevo" (en comparación con el mes anterior?
Sin embargo, si está buscando clientes que estén activos, puede utilizar DISTINCTCOUNT
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown In my report, I have 2 types of KPI according to Client . one is "Active Clients #" and this is the distinctcount of ClientKey.
And second is "New Active Clients #" and this is New Clients.
Need to help me to calculate the "New Active Clients #" measure.
And show this "New Active Clients #" according to the live dashboard. The live dashboard link is here
https://public.tableau.com/profile/lintao#!/vizhome/DigitalStrategyDashboard/ClientInsight.