Formula to Count Boolean Values Power BI

Asked

Viewed 478 times

1

Good evening, everyone,

I am trying to make a Count with boolean values in power bi, using DAX formulas, but formulas do not return any value in the graphs.

Does anyone know how to tell the problem of the DAX formula below?

   SLA Chamado (Atrasado) = 
    CALCULATE
    (
        COUNTAX
        (
            FILTER(Chamado;Chamado[SLAExpirado] = TRUE());
            Chamado[SLAExpirado]
        )

     )

2 answers

1

I believe that you do not need to use the CALCULATE function at the same time as you use the COUNTAX function. Since both functions were used separately, they would return an integer value, which is what you are looking for. In this way, I would only try to use the formula COUNTAX. Thus getting its formula:

SLA Chamado (Atrasado) = 
    COUNTAX
    (
        FILTER(Chamado;Chamado[SLAExpirado] = TRUE());
        Chamado[SLAExpirado]
    )

1

In my view the problem is that its formula returns blank values for cases where the "SLA" is not expired.

Try using an IF to check the return and put some value if the return is 'null'

example:

     SLA Chamado (Atrasado) = 
        IF((
        CALCULATE
        (
            COUNTAX
            (
                FILTER(Chamado;Chamado[SLAExpirado] = TRUE());
                Chamado[SLAExpirado]
            )

         )=1;1;0)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.