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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

POWER BI DAX: ID agregados por mes + ID eliminados de recuento

Intento calcular: - Total 'SR-ID' por mes (fácil) - Total 'SR-ID' nuevo (ID de recuento que anteriormente no estaban disponibles en todos los meses anteriores) - Total 'SR-ID' de edad (ID de recuento que estaban disponibles en el último mes, pero ya no en el mes actual) Para eso agregué un 'INDEX' a la tabla 'BridgePeriod' que tiene el 'YearMonth' que utilizo: Index á COUNTROWS( FILTER(VALUES(BridgePeriod[YearMonth]); BridgePeriod[YearMonth] < EARLIER(BridgePeriod[YearMonth]) )) Y utilizo las siguientes medidas dax: Medida 1 SR-ID Nuevo SR-ID NUEVO - IDENTIFICADORes de VAR - VALORES(CUSTAMOUNTREPORTTABLE[SR-ID]) VAR LastMonthIDs ? CALCULATETABLE(VALUES(CUSTAMOUNTREPORTTABLE[SR-ID]); FILTRO( ALL(BridgePeriod); 'BridgePeriod'[Index] á SELECTEDVALUE('BridgePeriod'[Index]) -1)) Return CALCULATE( COUNTROWS( EXCEPT(Ids; LastMonthIDs)); CUSTAMOUNTREPORTTABLE[SR-ID] <> "") Mida 2 SR-ID OLD COUNT SR-ID OLD - VAR Ids ? VALUES(CUSTAMOUNTREPORTTABLE[SR-ID]) VAR LastMonthIDs ? CALCULATETABLE(VALUES(CUSTAMOUNTREPORTTABLE[SR-ID]); FILTRO( ALL(BridgePeriod); 'BridgePeriod'[Index] á SELECTEDVALUE('BridgePeriod'[Index]) -1)) Return CALCULATE( COUNTROWS( EXCEPT(LastMonthIds; Ids)); CUSTAMOUNTREPORTTABLE[SR-ID] <> "") Mida 3 SR-ID Total COUNT SR-ID TOTAL - CALCULATE( DISTINCTCOUNT(CUSTAMOUNTREPORTTABLE[Customer-ID]); CUSTAMOUNTREPORTTABLE[Total]>0; CUSTAMOUNTREPORTTABLE[Bedrijf]-"001"; CUSTAMOUNTREPORTTABLE[SR-ID] <> "" ) Con el índice y las medidas anteriores esperaba contar por mes agregados/eliminados ID, pero de alguna manera no muestra nada cerca de lo que esperaba. El conjunto de datos se incluye en el archivo PowerBI, vínculo siguiente. Tenga en cuenta que el 'CUSTAMOUNTREPORTTABLE' tiene un montón de filas, mucho menos que el SR-ID. Es por eso que filtro para 'CUSTAMOUNTREPORTTABLE[SR-ID] <> ""' Agregué el vínculo al archivo de Power BI: https://1drv.ms/u/s!AliMmiR5bX0C3EWm22LqmQswnQ3R?e=at1VeL ¿Alguna sugerencia?
0 REPLIES 0

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.