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
Syndicate_Admin
Administrator
Administrator

Contar filas si

Hola estoy tratando de contar filas entre fechas, estaba muy bien pero cuando agrego 'FACT - CW' [Transacción] = "prueba" como filtro parece ignorarlo.

Days Old =
CALCULATE (
COUNTROWS ( 'DIM - Date Table' ),
DATESBETWEEN ( 'DIM - Date Table'[Date], 'FACT - CW'[Date of Receipt],'FACT - CW'[C-Date]-1),
'DIM - Date Table'[IsWorkingDay] = 1,
'DIM - Date Table'[IsHoliday] = 0,
'FACT - CW'[Transaction] = "test"
)

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

@NewbieJono

por favor pruebe

Days Old =
CALCULATE (
    COUNTROWS ( 'DIM - Date Table' ),
    DATESBETWEEN (
        'DIM - Date Table'[Date],
        'FACT - CW'[Date of Receipt],
        'FACT - CW'[C-Date] - 1
    ),
    'DIM - Date Table'[IsWorkingDay] = 1,
    'DIM - Date Table'[IsHoliday] = 0,
    'FACT - CW'[Transaction] = "test",
    CROSSFILTER ( 'DIM - Date Table'[Date], 'FACT - CW'[Date], BOTH )
)
Syndicate_Admin
Administrator
Administrator

Su tabla de fechas filtra FACT - CW - no al revés, por eso se ignora.

¿Puede compartir una imagen del modelo de datos (relaciones)?

esto tan cerca como puedo pensar (Dax ha cambiado un poco), no funciona

Days Old =
CALCULATE (
    COUNTROWS ( 'DIM - Date Table' ),
    DATESBETWEEN (
        'DIM - Date Table'[Date],
        'FACT - Casework'[Date of Receipt],
        'FACT - Casework'[COO Date] - 1
    ),
    'DIM - Date Table'[IsWorkingDay] = 1
        && 'DIM - Date Table'[IsHoliday] = 0,
    FILTER ( 'FACT - Casework', 'FACT - Casework'[Transaction] = "unallocated" )
)

La única relación es entre el tabel de fecha y la tabla FACT CW

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!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors