Forum Discussion
apenaranda
Post Partisan
2 years agoData from a table (count and sum)
Hello, I have the following table as data No Fecha Cod. User 1 01/01/2024 1 2 01/01/2024 1 3 03/01/2024 2 4 04/01/2024 3 5 05/01/2024 3 6 01/01/2024 2 7 07/...
Syndicate_Admin
Administrator
2 years agoHola @Syndicate_Admin ,
Modifiqué la medida 2 y agregué algunos comentarios más.
Measure 2 =
VAR _count = CALCULATE(DISTINCTCOUNT('Table'[Cod. User]),FILTER(ALL('Table'),'Table'[Date] = MAX('Table'[Date]))) //Counts the different user codes for the current date
VAR _table = SUMMARIZE('Table','Table'[Date],'Table'[Cod. User]) // Create virtual table to get table with unique date and user code values
VAR _total_count = COUNTROWS(_table) // Count the number of rows in the virtual table
RETURN
IF(ISINSCOPE('Table'[Date]),_count,_total_count) // Display different data in layers, date layer and total layer display different counts
Si su período actual no se refiere a esto, por favor aclárelo en una respuesta de seguimiento.
Saludos
Clara Gong
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Puede encontrar más información sobre la función ISINSCOPE en la documentación: Función ISINSCOPE (DAX) - DAX | Microsoft Learn.
apenaranda
Post Partisan
2 years agoSorry, I don't understand the VAR _count part when you add the
FILTER(ALL('Table'),'Table'[Date] = MAX('Table'[Date]))