Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LoloGox
Frequent Visitor

Organizar Productos por fecha de altas y bajas

Hola!

 

Tengo un informe en el que se necesita realizar los siguientes cálculos por cada Producto:

  • Fecha de alta producto (Con la fecha más reciente por Producto)
  • Fecha de baja de producto (Fecha más reciente por Producto)

 

Con la siguiente estructura:

LoloGox_0-1655805651125.png

 

 

Y que al final pueda organizar por cada producto la FechaAlta, FechaBaja (si no hay fecha de baja de producto, estará en blanco) con la siguiente estructura:

 

LoloGox_1-1655805651126.png

 

Muchas gracias!

 

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin ,

Estos son los pasos que puede seguir:

1. Crear columna calculada.

maxgroup_date =
var _max=MAXX(FILTER(ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&'Table'[TipoDeSolicitud]=EARLIER('Table'[TipoDeSolicitud])),[FechaSolicitud])
return
IF(
    'Table'[TipoDeSolicitud]="Alta",_max)
maxdate =
var _maxdate = MAXX(ALL('Table')
,[FechaSolicitud])
return
IF(
    'Table'[TipoDeSolicitud]="Baja",_maxdate)

vyangliumsft_0-1656033194113.png

2. Crear tabla calculada.

Table 2 =
SUMMARIZE(
    'Table',
    'Table'[Product],
    "FechaAlta",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxgroup_date]),
"FechaBaja",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxdate])
)

3. Resultado:

vyangliumsft_1-1656033194116.png

Saludos

Liu Yang

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin ,

Estos son los pasos que puede seguir:

1. Crear columna calculada.

maxgroup_date =
var _max=MAXX(FILTER(ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&'Table'[TipoDeSolicitud]=EARLIER('Table'[TipoDeSolicitud])),[FechaSolicitud])
return
IF(
    'Table'[TipoDeSolicitud]="Alta",_max)
maxdate =
var _maxdate = MAXX(ALL('Table')
,[FechaSolicitud])
return
IF(
    'Table'[TipoDeSolicitud]="Baja",_maxdate)

vyangliumsft_0-1656033194113.png

2. Crear tabla calculada.

Table 2 =
SUMMARIZE(
    'Table',
    'Table'[Product],
    "FechaAlta",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxgroup_date]),
"FechaBaja",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxdate])
)

3. Resultado:

vyangliumsft_1-1656033194116.png

Saludos

Liu Yang

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.