Forum Discussion
How do you filter one column from one table = to another column from another table using slicers?
I am trying to recreate a query from sql using the slicers. I am simplifying here but basically the query is:
"Select column1, column2 etc....
from table1, table2
and table1_object = table2_code
There are others but I need to get over this hurdle first. Not sure if I need to join the tables first or can this be done without joinging or merging. Hope someone can help. Thx
wpf_ , Create a join in data model, then you can simply drag column in visual
Drag in table visual with option don't summarize for all columns
DAX vs SQL: https://www.youtube.com/watch?v=WlvQ_SGy4iA&list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj
3 Replies
- amitchandak
Super User
wpf_ , Create a join in data model, then you can simply drag column in visual
Drag in table visual with option don't summarize for all columns
DAX vs SQL: https://www.youtube.com/watch?v=WlvQ_SGy4iA&list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj
- wpf_
Post Prodigy
Can I join it in dax using calculatetable or something similar instead of doing it in power query? I would like to keep the tables the way it is because I have other queries.
Also how can I accomplish this query in power bi?
"Select column1, column2 etc....
from table1, table2
and table1_object = table2_code
....
....
and table1_evtcode not in (select nvl(table3_prvcode,'000000') from table3 where table3_prvvalue = 'OUT OF SERVICE')
Do i need to join all 3 tables to accomplish this?
- AnonymousNot applicable
Hi wpf_ ,
You can refer the following links to get it.
Get a field value from a related table in Power BI: DAX RELATED Function Explained
Sum of Sales for Red products = SUMX( FILTER( FactInternetSales, RELATED(DimProduct[Color])="Red" ), FactInternetSales[SalesAmount] )How to find values from another table
If the above ones can't help you, please provide some sample data in table1, table2 & table3(exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards