cancel
Showing results for
Did you mean:
Helper I

## Valor Anterior Apenas do Ultimo Valor

Ola,

Trazer apenas o valor anterior do ultimo valor da categoria "NumLinha".

Na imagem abaixo preciso que aparece apenas o valor 72, pois 96 é o ultimo valor da "Tarefa" 2 conforme o "NumLinha".

Arquivo aqui

Fiz esta medida:

``````Linha =
CALCULATE (
MAX ( Tabela[Duração] );
FILTER (
ALLEXCEPT ( Tabela; Tabela[Tarefa] );
Tabela[NumLinha] < MAX ( Tabela[NumLinha] )
)
)``````

1 ACCEPTED SOLUTION
Community Support

Hi @Vilmar  ,

You could create two measures as follows:

``````flag = CALCULATE(MAX([NumLinha]),ALLEXCEPT('Table','Table'[Tarefa ]))
``````
``````Linha =
IF (
MAX ( [NumLinha] ) = [flag],
CALCULATE (
MAX ( [Duracao] ),
FILTER (
ALL ( 'Table' ),
[Tarefa ] = MAX ( [Tarefa ] )
&& [NumLinha] < MAX ( [NumLinha] ))))``````

The final output is shown below:

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

Hi @Vilmar  ,

You could create two measures as follows:

``````flag = CALCULATE(MAX([NumLinha]),ALLEXCEPT('Table','Table'[Tarefa ]))
``````
``````Linha =
IF (
MAX ( [NumLinha] ) = [flag],
CALCULATE (
MAX ( [Duracao] ),
FILTER (
ALL ( 'Table' ),
[Tarefa ] = MAX ( [Tarefa ] )
&& [NumLinha] < MAX ( [NumLinha] ))))``````

The final output is shown below:

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User III

@Vilmar sorry I don't know Spanish, what expected output you are looking for?

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helper I

Preciso trazer o valor anterior da coluna duração, mas apenas o ultimo (NumLinha) de cada categoria (Tarefa).

Na imagem não quero trazer os valores em vermelho

Announcements

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

#### Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Top Kudoed Authors