Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello everyone,
I am having trouble when trying to merge data from 4 different tables into one.
Here is what I have (the relationships between the tables are stablished by the columns with different colors):
What I need is to create one single table with the following columns:
- Data;
- Nome da Conta;
- Saldo SAP;
- Saldo Bancos
I'm trying to use the following sentence:
Table = SELECTCOLUMNS(JDT1;"Data";RELATED('Calendário'[Data]);"Nome da Conta";RELATED('Plano de Contas'[Nome da Conta]);"Saldo SAP";'JDT1'[Saldo SAP];"Saldo Bancos";LOOKUPVALUE('Extrato Bancário'[Saldo Bancos];'Calendário'[Data];RELATED('Calendário'[Data])))
But I always get an error message. Can you guys help me? What am I doing wrong?
Thanks in advance!
@mr_guedes,
You have many-to-many relationship between JDT1 table and Extrato Bancário table, please check if the following DAX returns your expected result, if not, please share sample data of your tables for us to analyze.
Table = SELECTCOLUMNS(JDT1;"Data";RELATED('Calendário'[Data]);"Nome da Conta";RELATED('Plano de Contas'[Nome da Conta]);"Saldo SAP";'JDT1'[Saldo SAP];"Saldo Bancos";CALCULATE(MAX('Extrato Bancário'[Saldo Bancos]);FILTER('Calendário';COUNTROWS(JDT1)>0)))
Regards,
Lydia
@v-yuezhe-msft wrote:@mr_guedes,
You have many-to-many relationship between JDT1 table and Extrato Bancário table, please check if the following DAX returns your expected result, if not, please share sample data of your tables for us to analyze.Table = SELECTCOLUMNS(JDT1;"Data";RELATED('Calendário'[Data]);"Nome da Conta";RELATED('Plano de Contas'[Nome da Conta]);"Saldo SAP";'JDT1'[Saldo SAP];"Saldo Bancos";CALCULATE(MAX('Extrato Bancário'[Saldo Bancos]);FILTER('Calendário';COUNTROWS(JDT1)>0)))
Regards,
Lydia
Lydia,
I tried as you told me, but it's showing one single value to the whole column. I need to see the value at the closing of the day.
As you requested, I sent the Pbi file:
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |