Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help migrating form from Tableau to PowerBi

Hello, sorry to bother you all guys, but I'm struggling with this and can't figure out how to solve it. I have this formula of a calculated column from tableau:   I'm trying to replicate it ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    You can use the MAXX function instead:

    https://docs.microsoft.com/en-us/dax/maxx-function-dax

    SEMAFORO EPICA =
    VAR AUX =
        SWITCH (
            'JIRA_INGENIERIA_FEATURES'[JIRA_INGENIERIA_EPICAS.ESTADO],
            "Cerrado", 0.1,
            "Cancelado", 0.11,
            "En espera", 0.5,
            IF (
                'JIRA_INGENIERIA_FEATURES'[SEMAFORO FEATURE] = 2
                    || 'JIRA_INGENIERIA_FEATURES'[SEMAFORO FEATURE] = 3,
                'JIRA_INGENIERIA_FEATURES'[SEMAFORO FEATURE],
                1
            )
        )
    RETURN
        MAXX (
            FILTER (
                ALL ( JIRA_INGENIERIA_FEATURES ),
                'JIRA_INGENIERIA_FEATURES'[JIRA_INGENIERIA_EPICAS.ESTADO]
                    = MAX ( 'JIRA_INGENIERIA_FEATURES'[JIRA_INGENIERIA_EPICAS.ESTADO] )
            ),
            AUX
        )

     

    Best Regards,

    Liu Yang

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