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
Ratax
Helper I
Helper I

Total acumulado con contexto de filtro

Hola

He probado esta función:

Acumulado 2 - CALCULAR (
DISTINCTCOUNT( 'PBI StickRoll'[ProductionItemBarcode] ),
FILTRO (
ALLSELECTED('PBI StickRoll'[CreationDate - Copiar]),
'PBI StickRoll'[CreationDate - Copy] <- MAX ('PBI StickRoll'[CreationDate - Copy] ))
)
Esto acumula un elemento determinado creado. Quiero agregar un filtro que sólo filtra la fecha de hoy así que agregó la instrucción
Acumulado 3 - CALCULAR (
DISTINCTCOUNT( 'PBI StickRoll'[ProductionItemBarcode] ),
FILTRO (
ALLSELECTED('PBI StickRoll'[CreationDate - Copiar]),
'PBI StickRoll'[CreationDate - Copy] <- MAX ('PBI StickRoll'[CreationDate - Copy] )),
'PBI StickRoll'[CreationDate] á HOY()
)
Pero eso no parece funcionar.
¿Puede alguien ayudar
1 ACCEPTED SOLUTION
Ratax
Helper I
Helper I

Contiene una columna de texto y una columna de fecha y hora

im tratando de hacer un gráfico de líneas acumulativo de las filas en la columna de texto productionitemstickroll, pero sólo mostrar el gráfico acumulativo de la fecha actual. Cuando uso un filtro visual (fecha relativa) funciona bien

Ratax_0-1606812603572.png

Pero cuando intento agregar el contexto de filtro diario a la medida(acumulativo 3) el gráfico se rompe.

Acumulado 3 - CALCULAR (
DISTINCTCOUNT( 'PBI StickRoll'[ProductionItemBarcode] ),
FILTRO (
ALLSELECTED('PBI StickRoll'[CreationDate - Copiar]),
'PBI StickRoll'[CreationDate - Copy] <- MAX ('PBI StickRoll'[CreationDate - Copy] )),
'PBI StickRoll'[CreationDate] á HOY()
)

View solution in original post

3 REPLIES 3
Ratax
Helper I
Helper I

Contiene una columna de texto y una columna de fecha y hora

im tratando de hacer un gráfico de líneas acumulativo de las filas en la columna de texto productionitemstickroll, pero sólo mostrar el gráfico acumulativo de la fecha actual. Cuando uso un filtro visual (fecha relativa) funciona bien

Ratax_0-1606812603572.png

Pero cuando intento agregar el contexto de filtro diario a la medida(acumulativo 3) el gráfico se rompe.

Acumulado 3 - CALCULAR (
DISTINCTCOUNT( 'PBI StickRoll'[ProductionItemBarcode] ),
FILTRO (
ALLSELECTED('PBI StickRoll'[CreationDate - Copiar]),
'PBI StickRoll'[CreationDate - Copy] <- MAX ('PBI StickRoll'[CreationDate - Copy] )),
'PBI StickRoll'[CreationDate] á HOY()
)

Hola @Ratax

Si entiendo correctamente, espera mostrar solo los valores acumulativos de hoy a lo largo del tiempo, ¿verdad? Si es así, podría probar la siguiente medida:

Cumulative = 
CALCULATE (
    DISTINCTCOUNT ( 'PBI StickRoll'[ProductionItemBarcode] ),
    FILTER (
        ALLSELECTED ( 'PBI StickRoll' ),
        'PBI StickRoll'[CreationDate - Date] = TODAY ()
            && 'PBI StickRoll'[CreationDate - Time]
                <= MAX ( 'PBI StickRoll'[CreationDate - Time] )
    )
)

En mi ejemplo, agrego dos columnas para separar la fecha y la hora. [CreationDate - Time] se utiliza como Axis en el gráfico y [CreationDate - Date] se utiliza para comparar con la función TODAY() en la medida.

120303.jpg

120304.jpg

Al agregar el filtro diario a la medida, debe tener en cuenta que los campos de ambos lados de un signo igual deben tener el mismo tipo de datos. Y no olvides la función && in FILTER() cuando hay más de un filtro.

Para obtener más información, descargue el archivo PBIX de ejemplo. Por favor, hágamelo saber si esto ayuda.

Equipo de apoyo a la comunidad _ Jing Zhang
Si este post ayuda,por favor considere Aceptarlo como la solución para ayudar a otros miembros a encontrarlo.

Ashish_Mathur
Super User
Super User

Hola

Comparta algunos datos, describa la pregunta y muestre el resultado esperado.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.