Forum Discussion
raphaelcamposs
7 years agoRegular Visitor
Relationship between tables with aggregation (Table Chart)
Hello Everyone. I have 2 tables in PowerBI. Table 1 (Keyword, Country, Webiste, ClickDate, NumClicks) Table 2 (Keyword, Country, Website, TotalDeposit, NumDeposit) I need to create a t...
- 7 years ago
Hi raphaelcamposs,
You could create below measure:
Total NumClicks = CALCULATE ( SUM ( Table1[NumClicks] ), FILTER ( Table1, Table1[Keyword] = LASTNONBLANK ( Table2[Keyword], 1 ) && Table1[Country] = LASTNONBLANK ( Table2[Country], 1 ) && Table1[Webiste] = LASTNONBLANK ( Table2[Webiste], 1 ) ) )Then, create a table visual with information from Table 2 and above measure.
Best regards,
Yuliana Gu
v-yulgu-msft
7 years agoMicrosoft Employee
Hi raphaelcamposs,
You could create below measure:
Total NumClicks =
CALCULATE (
SUM ( Table1[NumClicks] ),
FILTER (
Table1,
Table1[Keyword] = LASTNONBLANK ( Table2[Keyword], 1 )
&& Table1[Country] = LASTNONBLANK ( Table2[Country], 1 )
&& Table1[Webiste] = LASTNONBLANK ( Table2[Webiste], 1 )
)
)
Then, create a table visual with information from Table 2 and above measure.
Best regards,
Yuliana Gu
- raphaelcamposs7 years agoRegular Visitor
Fantastic! It worked! Thank you so much!
- YoungJim887 years agoNew Member