Forum Discussion

smedina1's avatar
smedina1
Frequent Visitor
3 years ago
Solved

CONTAR.SI con formula DAX

Buenas tardes, Quisiera preguntar como puedo generar una formula en DAX que me permita ver cuantas veces se repite una variable, esto agregando una nueva columna, lo que por ejemplo en excel usarí...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi smedina1 ,

    add a index column in PowerQuery Editor -> colse and apply.

    and new a calculated column:

    Repetido = 
    CALCULATE(
        COUNTROWS('Table'),
            'Table'[Client] = EARLIER('Table'[Client])
                && 'Table'[Folder] = EARLIER('Table'[Folder])
                && 'Table'[Index] <= EARLIER('Table'[Index])
    )

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data