Forum Discussion
New table with corresponding columns
- Anonymous7 years ago
i GOT IT!
With SELECTCOLUMNS table above, I hade created new columns using LOOKUPVALUE.
'DVENDAS" is the main table.
Data Entregue = LOOKUPVALUE('DVENDAS'[Data MD]; 'DVENDAS'[Bilhete];[Bilhete]; 'DVENDAS'[Passageiro];[Passageiro]; 'DVENDAS'[Data Servi.];[Data do serviço]; 'DVENDAS'[Serviço];[Serviço]; 'DVENDAS'[Status];"ENTREGUE") Agência Entregue = LOOKUPVALUE('DVENDAS'[Agência]; 'DVENDAS'[Bilhete];[Bilhete]; 'DVENDAS'[Passageiro];[Passageiro]; 'DVENDAS'[Data Servi.];[Data do serviço]; 'DVENDAS'[Serviço];[Serviço]; 'DVENDAS'[Status];"ENTREGUE")Thanks guys for support.
Actually, my original table is huge, millions of rows and more than 20 columns.
Two of this columns are called "Type of sale" and "Status".
I need a new table with [Type of sale]="PTA" && [Status]="VENDIDO". Note: vendido is the word in portuguese for sold.
In [Status] there is two relevant values: "VENDIDO" e "ENTREGUE" - delivered in english.
So I have this:
PTA =
SELECTCOLUMNS (
FILTER (
DVENDAS; [Tipo Venda]="PTA" && [Status]="VENDIDO");
"Bilhete"; DVENDAS[Bilhete];
"Agência"; DVENDAS[Agência];
"Bilheteiro"; DVENDAS[Logins.nome];
"Data da compra"; DVENDAS[Data MD];
"Linha"; DVENDAS[Linha];
"Serviço"; DVENDAS[Serviço];
"Passageiro"; DVENDAS[Passageiro];
"Data do serviço"; DVENDAS[Data Servi.];
"Valor cobrado"; DVENDAS[Vlr.Cobrado])But now I need to insert new columns in this table that shows me when this ticket was delivered (with [Status]="ENTREGUE", near to this columns, into right - and idk how to do :(
i GOT IT!
With SELECTCOLUMNS table above, I hade created new columns using LOOKUPVALUE.
'DVENDAS" is the main table.
Data Entregue = LOOKUPVALUE('DVENDAS'[Data MD];
'DVENDAS'[Bilhete];[Bilhete];
'DVENDAS'[Passageiro];[Passageiro];
'DVENDAS'[Data Servi.];[Data do serviço];
'DVENDAS'[Serviço];[Serviço];
'DVENDAS'[Status];"ENTREGUE")
Agência Entregue = LOOKUPVALUE('DVENDAS'[Agência];
'DVENDAS'[Bilhete];[Bilhete];
'DVENDAS'[Passageiro];[Passageiro];
'DVENDAS'[Data Servi.];[Data do serviço];
'DVENDAS'[Serviço];[Serviço];
'DVENDAS'[Status];"ENTREGUE")
Thanks guys for support.
- v-cherch-msft7 years ago
Microsoft Employee
Hi Anonymous
Glad to hear you've solved it, please accept your answer as solution, that way, other community members will easily find the solution when they get same issue.
Regards,
Cherie