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
Anonymous
Not applicable

Ayuda para crear una nueva columna en función de la columna Fecha

Hola a todos

Necesito crear una nueva columna debido al siguiente escenario:

Captura.PNG

Al final es mover las cuanidades un mes menos en la Fecha de Venta. Estaba tratando con Lookupvalue, pero no funcionó.

Espero que puedas ayudarme gracias.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@romero01 , Probar

sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [StockDate]-earlier([SalesDate] ),[ventas])

O
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [SalesDate]-earlier([StockDate] ),[ventas])

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@romero01 , Probar

sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [StockDate]-earlier([SalesDate] ),[ventas])

O
sumx(filter( Table, [Product]-earlier([Product]) && [Customer]-earlier([Customer]) && [SalesDate]-earlier([StockDate] ),[ventas])

Anonymous
Not applicable

Hola @Greg_Deckler estaba probando el qurey, pero parece que me está diciendo que el parámetro no es el tipo correcto.

Hola @amitchandak creo que estamos cerca 🙂 pero sólo está mostrando un resultado o tal vez sólo está tomando el primero.

Captura.PNGAdjunto el enlace con el documento powerbi. Whith ambas consultas.

https://t2cspain-my.sharepoint.com/:u:/g/personal/cromero_t2client_com/EbH-iRo4w3hPluWNiQR2YYcB2V2uv...

Espero que Yu pueda ayudarme gracias.

Hola @romero01 ,

¿Podría proporcionar el valor correcto del campo [WhatIWant] basado en los datos de ejemplo actuales y la lógica de cálculo? Gracias.

Help creating new column depending Date column_2.JPG

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @Greg_Deckler algún consejo sobre este tema?

Hola @amitchandak algún consejo sobre este tema?

@romero01 Tuve un error de sintaxis, tal vez:

What I Want =
  MAXX(
    FILTER(
      'Table',
      [Product]=EARLIER([Product]) &&
        [StockDate]=EARLIER([SalesDate]) &&
          [Customer]=EARLIER([Customer])
    ),
    [Stock]
  )

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@romero01 quizás:

What I Want =
  MAXX(FILTER('Table',[Product]=EARLIER([Product])&&[StockDate]=EARLIER([SalesDate]&&[Customer]=EARLIER([Customer])),[Stock])

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.