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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
DennisSchlein
Helper II
Helper II

Newbie question - filter related data

Hi 

i'm brand new with PBI. I'm trying to create one of my first very basic models.
And thus this is probably a simple question, I don't yet know how to solve it.

 

DennisSchlein_0-1669802648110.png

 

 

On my main table - I have a consignee number - a customer number.
This customer number have a relationship to cg2 (group of customers within this brance)
and cg2 has a relationship to cg1. Which is the top level.


Within cg1 I have a list of customers beeing invoiced from a certain solution. that list of cg1 id's is in the table: InvoiceCustomers.

But I want to show name from cg1, that has a relation to InvoiceCustomers.

How do I do that?

 

DennisSchlein_1-1669802660523.png

 


Thanks in advance, 

 

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @DennisSchlein ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1669863995700.png

vjianbolimsft_1-1669864007541.png

Then apply the measure:

_Name = CALCULATE(MAX('cg1'[Name]),FILTER(ALL(cg1),[Code]=MAX('InvoiceCustomers'[CustomerGrouping])))

Final output:

vjianbolimsft_2-1669864113664.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @DennisSchlein ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1669863995700.png

vjianbolimsft_1-1669864007541.png

Then apply the measure:

_Name = CALCULATE(MAX('cg1'[Name]),FILTER(ALL(cg1),[Code]=MAX('InvoiceCustomers'[CustomerGrouping])))

Final output:

vjianbolimsft_2-1669864113664.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-jianboli-msft this gives mes exactly what I was looking for 🙂 thank you very much 🙂 

DennisSchlein
Helper II
Helper II

if I in dax studio do this:
NATURALLEFTOUTERJOIN ( InvoiceCustomers, cg1 )

I get :

DennisSchlein_0-1669808807593.png



How do I write the same in PBI?

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors