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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Calcular mediante filtro

Tengo dos mesas

La primera tabla tiene una fecha donde se emitieron las citas.

La segunda tabla tiene una fecha en la que el oficial estaba en un horario determinado.

Las tablas están unidas por un ibm único #

Estoy tratando de filtrar los datos para mostrar en qué turno escribió el oficial los boletos. Puedo obtener citas totales escritas por el oficial, pero si ese oficial trabaja en un turno diferente, también produce el total de ese turno como un total del oficial.

IBMoffense_datecitation_number
jj22001/01/2022

1

jj22001/01/2022

2

jj22001/02/2022

5

aa42001/01/2022

3

aa42001/01/20224
aa42001/02/2022

6

IBMturnofecha de inicio del turno
jj220un cambio01/01/2022
jj220un cambio01/02/2022
aa420b turno01/01/2022
aa420t shift01/02/2022
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Crear una columna calculada en la tabla Citación

Shift = 
var offenseDate = Citations[Offense date]
return SELECTCOLUMNS( TOPN( 1, 
   FILTER( RELATEDTABLE( Shifts ), Shifts[Start date] <= offenseDate ),
   Shifts[Start date], DESC ),
   "@shift", Shifts[Shift]
)

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Crear una columna calculada en la tabla Citación

Shift = 
var offenseDate = Citations[Offense date]
return SELECTCOLUMNS( TOPN( 1, 
   FILTER( RELATEDTABLE( Shifts ), Shifts[Start date] <= offenseDate ),
   Shifts[Start date], DESC ),
   "@shift", Shifts[Shift]
)

Gracias que funciona

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors