Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kousar99
Helper I
Helper I

how to use Joins and Subquries in Power Bi

Hi, 

Since I am using SQL queries and whatever the output is coming from queries same thing showing in form of charts in power bi.

Since I'm new to power bi and Dax, I need help and suggestions for how to use subqueries used in SQL ( As per my thinking filtering is done) and joins in power bi and Dax.
Looking for your kind response.

 

Thanks & Regards,

 Heena Kousar

2 REPLIES 2
Anonymous
Not applicable

Hi @kousar99,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@kousar99 , Please share a problem, while we can create a table and pass it as a filter. But in DAX we do it DAX way, maybe a better solution is available

 

Check

Dax vs SQL -https://www.youtube.com/watch?v=WlvQ_SGy4iA&list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj

 

example

measure =
var _tab = summarize(filter(Table,{empresa_id]=4),[tenant_id])
return
calculate(sum(Table[Value]), filter(Table,Table[tenant_id] in _tab))

 

 

measure =
var _tab = summarize(filter(A, [date]= date(2020,11,05) && [State] ="Step2" && [Status] = "Status" ), A[FileName])
return
calculate(countrows(A) , filter(A , [FileName] in _tab && [State] ="Step2" && [Status] = "Status" ))

 

 

measure =
var _tab = summarize(filter(all(users), users[usermail] in values(users[usermail]) || users[businessrecipient] in values(users[usermail])),users[businessunit])
return
calculate(countrows(masterlist), filter(masterlist, masterlist[businessunit] in _tab))

 

refer

https://docs.microsoft.com/en-us/dax/treatas-function

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.