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
Allisond
Advocate II
Advocate II

Cálculo del censo total para el intervalo de fechas

Hola a todos,
Tengo una mesa con PtIDFecha de inicio Fecha de finalización de la facturación
Necesito calcular la ocupación en función del intervalo de fechas e incluir la fecha de inicio y la fecha de finalización en los días. Estoy usando esta medida, pero no está capturando a todos los pacientes. ¿Puede alguien ayudarme con lo que me estoy perdiendo?
Ocupación ?
VAR StartDate - VALUE(SELECTEDVALUE( 'Census Detail'[StartDate] ) )
VAR BillingEndDate - VALUE(SELECTEDVALUE( 'Census Detail'[Billing End Date] ) )
VAR MinDate - VALOR( MIN( Fechas[DayDate] ) )
VAR MaxDate - VALOR( MAX( Fechas[DayDate] ) )

devolución
IF( AND( StartDate <- MinDate, BillingEndDate >- MinDate ) ,
MIN(BillingEndDate, MaxDate ) - MinDate,
IF( AND( AND( Y( StartDate > ? MinDate, StartDate <- MaxDate), BillingEndDate > ? MinDate),
MIN( BillingEndDate, MaxDate) - AdmitDate,
"0" ) )
A continuación, creo Censos DE SUMX( VALUES('Detalle del Censo de Facturación'), [Ocupación])
Cualquier ayuda sería muy apreciada.
1 REPLY 1
v-diye-msft
Community Support
Community Support

Hola @Allisond

Podrías considerar proporcionar tu psípido ficticio que sería un engaño para nosotros investigarlo más a fondo.

Puede cargarlo en onedrive para la empresa y compartir el enlace aquí. por favor, no se olvide de revelar los resultados esperados y eliminar la información confidencial.

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

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.