cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
caslus Frequent Visitor
Frequent Visitor

Transform minutes to hour using filters

Hello guys, my first time here Smiley Happy

So, I have one column filled with minutes and I need transform to HH:MM , but I need do this using filter where two column are equals, and another column is equal "Baixa". Actually I need to calculate the averange hourusing the filter. So I need Sum the hours, and divide for number of retorned lines " (Sum(columnMinute)/(Sum(DistinctCH)" the column Distinct have value "1" for each line.

I tried this way, but not working:

 

 

Campo Final Tempo Baixa LPJ = FORMAT(Consulta2[Var_Aux_Tempo Baixa LPJ]/60;"00") & ":" & FORMAT(MOD(Consulta2[Var_Aux_Tempo Baixa LPJ];60);"00") &":"& FORMAT(MOD(MOD(Consulta2[Var_Aux_Tempo Baixa LPJ]*60;60);60);"00") 

 

1º try

Var_Aux_Tempo Baixa LPJ = CALCULATE(SUM(Consulta2[FTO_AIDAtendTotLPJ])/SUM(Consulta2[Count_Distinct_id_Chamado]); FILTER(Consulta2;Consulta2[Prio.]="Baixa" && Consulta2[Var_MesAno_Atual] = Consulta2[Var_MesAno_Data_Criação] && Consulta2[FTO_AIDAtendTotLPJ] <> 0  ) )

 

2º try

Var_Aux_Tempo Baixa LPJ = IF(Consulta2[Prio.] = "Baixa" && Consulta2[Var_MesAno_Atual] = Consulta2[Var_MesAno_Data_Fechamento]; sum(Consulta2[FTO_AIDAtendTotLPJ]) ;0 )


image.png

 

And I wanna use late the page filter, filtering by the company

image.png


 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Transform minutes to hour using filters

@caslus,

 

You may refer to the following DAX that creates a measure.

Average =
FORMAT (
    TIME ( 0, 0, AVERAGEX (
        FILTER (
            Consulta2,
            AND (
                Consulta2[Prio.] = "Baixa",
                Consulta2[Var_MesAno_Atual] = Consulta2[Var_MesAno_Data_Fechamento]
            )
        ),
        Consulta2[FTO_AIDAtendTotLPJ]
    )
        * 60 ),
    "HH:mm:ss"
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Transform minutes to hour using filters

@caslus,

 

You may refer to the following DAX that creates a measure.

Average =
FORMAT (
    TIME ( 0, 0, AVERAGEX (
        FILTER (
            Consulta2,
            AND (
                Consulta2[Prio.] = "Baixa",
                Consulta2[Var_MesAno_Atual] = Consulta2[Var_MesAno_Data_Fechamento]
            )
        ),
        Consulta2[FTO_AIDAtendTotLPJ]
    )
        * 60 ),
    "HH:mm:ss"
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
caslus Frequent Visitor
Frequent Visitor

Re: Transform minutes to hour using filters

Thank You friend.