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

Ayuda para VLook tipo de rquirement

Hola Gurús de Power BI,

Haciendo referencia a la siguiente imagen estoy buscando una fórmula DAX para crear una columna que dé el resultado "Convertido") si hay dos valores específicos "1.2 Design Checking" & 13.1 Inspección asociada con Project ID, por ejemplo, project id 103176 tiene Design Certification & Inspection Por favor ayúdame a crear eso?

Screenshot 2021-04-13 000730.png

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Ahí @ramhariessentia,

Puede probar la siguiente medida:

test = 
VAR test3 =
    IF (
        CALCULATE (
            COUNT ( 'Sample'[Project ID] ),
            FILTER (
                ALL ( 'Sample' ),
                'Sample'[Fee Name] = "13.1 Inspection"
                    && 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
            )
        ) >= 1,
        1,
        0
    )
VAR test2 =
    IF (
        CALCULATE (
            COUNT ( 'Sample'[Project ID] ),
            FILTER (
                ALL ( 'Sample' ),
                'Sample'[Fee Name] = "1.2 Design Checking"
                    && 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
            )
        ) >= 1,
        1,
        0
    )
RETURN
    IF (
        test2 = 1
            && test3 = 1,
        "1.2 Design Checking&&13.1 Inspection",
        MAX ( 'Sample'[Fee Name] )
    )

Final obtendrá lo siguiente:

v-luwang-msft_0-1619671706238.png

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Ahí @ramhariessentia,

Puede probar la siguiente medida:

test = 
VAR test3 =
    IF (
        CALCULATE (
            COUNT ( 'Sample'[Project ID] ),
            FILTER (
                ALL ( 'Sample' ),
                'Sample'[Fee Name] = "13.1 Inspection"
                    && 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
            )
        ) >= 1,
        1,
        0
    )
VAR test2 =
    IF (
        CALCULATE (
            COUNT ( 'Sample'[Project ID] ),
            FILTER (
                ALL ( 'Sample' ),
                'Sample'[Fee Name] = "1.2 Design Checking"
                    && 'Sample'[Project ID] = MAX ( 'Sample'[Project ID] )
            )
        ) >= 1,
        1,
        0
    )
RETURN
    IF (
        test2 = 1
            && test3 = 1,
        "1.2 Design Checking&&13.1 Inspection",
        MAX ( 'Sample'[Fee Name] )
    )

Final obtendrá lo siguiente:

v-luwang-msft_0-1619671706238.png

Syndicate_Admin
Administrator
Administrator

@ramhariessentia , Basado en lo que tengo, Pruebe una nueva columna como

if( calculate(distinctCOUNT([Fee Name]), filter(Table, [projectID] =earlier([projectID]) && [Fee Name] en {"1.2 Design Checking" , "13.1 Inspection (L1)"}))+0 =2, 1,0)

Estoy recibiendo el siguiente error de sintaxisScreenshot 2021-04-13 103647.png

ramhariessentia_0-1618277840829.png

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.