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
Anonymous
Not applicable

Cómo resumir un recuento agregado de la medida en una fila

Hola a todos,

Necesito ayuda - un superusuario aquí me ayudó a crear un tablero: Power BI Este foro específico: https://community.powerbi.com/t5/Desktop/AGGREGATION-How-to-filter-on-dates-with-a-dynamic-group-by-...

Esto me ayudó a crear una medida que devuelve los recuentos de una medida agregada por fila -

ahora necesito una manera de resumir y combinar esta medida específica INT1 a 11 a continuación en un valor y asígnelo INT0

Por ejemplo,

second stage result.png

El resultado será:

INT ? Recuento de medidas personalizadas

INT0 ? 3

Necesito resumir esto porque necesito poder restar esto de otra medida.

Count of INT Final - DL constant = 
var _int = SELECTEDVALUE(INT_SORT[INTRANK])
var tab = 
SUMMARIZE(
    DISTINCT(CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION]),
    CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION],
    "Count",
    COUNTROWS(
        FILTER(
            ALLSELECTED(CV_BW_SAP_ZOMS_O27_CEMI_STAGING),
            CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION] = EARLIER(CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION])
        )
    )
)

var newtab = 
ADDCOLUMNS(
    tab,
    "Result",
    "INT" & 
IF(COUNTROWS(
    FILTER(
        ALLSELECTED('CV_BW_SAP_ZOMS_O27_CEMI_STAGING'),
        CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION] = EARLIER(CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION] ))) >= 11, 11, COUNTROWS(
    FILTER(
        ALLSELECTED('CV_BW_SAP_ZOMS_O27_CEMI_STAGING'),
        CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION] = EARLIER(CV_BW_SAP_ZOMS_O27_CEMI_STAGING[DEVICE_LOCATION]))
        )
    )
)
return
COUNTROWS(
    FILTER(
        newtab,
        [Result]=_int
    )
)

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hola @nataliengarces ,

Puede crear dos medidas como se indica a continuación:

INT = "INT0"
Sumup Count of Custom Measure = 
SUMX ( VALUES ( INT_SORT[INTRANK] ), [Count of INT Final - DL constant] )

sum up measures.JPG

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.