cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vilmar
Helper I
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".

 

Sem título.png

Arquivo aqui 

Fiz esta medida:

 

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

 

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
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:

v-yalanwu-msft_1-1622101560682.png

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.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
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:

v-yalanwu-msft_1-1622101560682.png

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.

View solution in original post

parry2k
Super User III
Super User III

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






Did I answer your question? Mark my post as a solution.

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





@parry2k  obrigado

 

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

 

Sem título.png

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

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

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

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

Top Solution Authors