Forum Discussion
reiskleiton
5 years agoHelper II
USERELATIONSHIP
Hi all, I have tried to get data from one table based on another by using USERELATIONSHIP function. I need to get all the data that matches from CAR and Ordens Bloq tables on columns [Mês e ...
- 5 years ago
Hi reiskleiton ,
Looking at the data you have given beliw you can do it adding the following measure:
Excesso de limite = CALCULATE(SUM(CAR[Montante]); CAR[Cliente] in VALUES('Ordem Bloq'[Cliente]))Check result in attach PBIX.
reiskleiton
5 years agoHelper II
Hi MFelix
Please, feel free to ask many questions you want.
Let me try do explain how I would do it by Power Query.
Here are the tables used
- CAR - Group by [Mês e Ano] and [Cliente] and SUM [Montante]
- Ordens Bloq - Group by [Mês e Ano] and [Cliente] and SUM [Valor da Ordem]
- Add both to the visualization table
- Then Merge (Right Outer) CAR with Ordem Bloq
CAR[Cliente] = Ordem Bloq[Cliente]
CAR[Mês e Ano] = Ordem Bloq[Mês e Ano] - After the Merge, I will keep all the Non Blank values from CAR[Montante] and add it to the visualization.
Hope it helps you.
MFelix
5 years agoSuper User
Hi reiskleiton ,
Looking at the data you have given beliw you can do it adding the following measure:
Excesso de limite =
CALCULATE(SUM(CAR[Montante]); CAR[Cliente] in VALUES('Ordem Bloq'[Cliente]))
Check result in attach PBIX.
- reiskleiton5 years agoHelper II
- reiskleiton5 years agoHelper II
Hi @MFelix
I was working on it and realize that there is an issue in the Total amount
It is 1.957.834,71.
Do you know what could it be?
Thank you.