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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JuanviWebbeds
Helper II
Helper II

Columna calculada filtrada por valor de dos columnas

Hola

Tengo esta tabla calculada, tiene filas con valores, columnas con fecha de creación truncada a semanas y un valor de registro.

Necesito otro colum con el valor de la última semana (semana de creación - 7 días) y fecha de check-in el año pasado.

He probado varias soluciones con el resultado de acurrate, ¿cuál será el mejor aprobroche?

¡Gracias!

2020-03-19 12_01_59-Window.png

1 ACCEPTED SOLUTION

Tratar:

Nueva columna á sumx(filter(Table,[Creation] ? (antes([creación]) - 7) && [Registrar] á (antes([registrar]) - 365)),[noches de habitación])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

No lo obtuve completamente

Nueva columna [fecha de creación]-7

El otro que no me dieron

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hola

Gracias frist de todos!

Nuevo Colum - suma (noches de habitación) donde creación - 7 y check-in - 365

En SQL es fácil 🙂

Salud

Tratar:

Nueva columna á sumx(filter(Table,[Creation] ? (antes([creación]) - 7) && [Registrar] á (antes([registrar]) - 365)),[noches de habitación])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Greg_Deckler
Super User
Super User

No 100% en lo que estás preguntando con el último. Por favor, consulte este post sobre cómo obtener su pregunta respondida rápidamente: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Si desea el valor de la última semana puede hacer esto:

Column =
  VAR __Current = [CheckIn]
  VAR __CurrentMinus7Days = (__CurrentWeek - 7) * 1.
RETURN
  MAXX(FILTER('Table',[Checkin] = __CurrentMinus7Days),[RoomNights])
  


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Gracias por tu ayuda, pero esto no funciona.

Sólo quería poner el mismo valor de la creación del año pasado y el año pasado registrarse, trata de utilizar su solución con la suerte:

LastYearCreationsOverlastYearCheckin ?
VAR __Creation [Creación]
VAR __CreationMinus365Days ( __Creation - 365) * 1
VAR __CheckIn de habitaciones[CheckIn]
VAR __CheckInMinus365Days ( __CheckIn - 365) * 1
devolución
MAXX(FILTER(RoomNights;(RoomNights[Creation] á __CreationMinus365Days && RoomNights[CheckIn] - __CheckInMinus365Days)); [Noches de habitación])
Quiero el mismo valor de la creación - 365 días y el mismo valor de checkin - 365 día
La validación de estos datos en SQL no funciona.
¿Puedes ayudarme, por favor, y gracias!!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors