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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.