Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tudo que estiver relacionado a tratamento de dados, Power Query editor e linguagem M
Por Jeovanilton
#55731
Como fazer uma função no Power BI parecida com a seguinte funçao do excel =SE(E(A2=A1;B2=B1);1;0) esta função esta verificando se a celula de baixo esta igual a de cima e a celula de baixo da coluna B esta igual a de cima, se sim ele vai me retornar com o numero 1 se não me retorna com o numero 0. a intenção é que tem outra formula (CONT.SE) só puxando o que esta com o numero 1, tem como fazer isto no Power BI?
Você não está autorizado a ver ou baixar esse anexo.
Por babdallas
#55843
Veja se atende.
Você não está autorizado a ver ou baixar esse anexo.
Por babdallas
#55846
Melhorei a solução. Não gostei da anterior.
Código: Selecionar todos
let
    Fonte = Excel.CurrentWorkbook(){[Name="Tabela1"]}[Content],
    #"Tipo Alterado" = Table.TransformColumnTypes(Fonte,{{"Data e hora", type datetime}, {"Item", type text}, {"Formula", Int64.Type}}),
    RemoveColuna = Table.RemoveColumns(#"Tipo Alterado",{"Formula"}),
    Classifica = Table.Sort(RemoveColuna,{{"Data e hora", Order.Ascending}, {"Item", Order.Ascending}}),
    AdcionaColIndice = Table.AddIndexColumn(Classifica, "Índice", -1, 1),
    AdicionaColRepetido = Table.AddColumn(AdcionaColIndice, "Repetido", each try if Classifica[Data e hora]{[Índice]} = [Data e hora] and Classifica[Item]{[Índice]} = [Item] then 1 else 0 otherwise 0, Int64.Type),
    RemoveColIndice = Table.RemoveColumns(AdicionaColRepetido,{"Índice"})
in
    RemoveColIndice
Você não está autorizado a ver ou baixar esse anexo.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord