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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mangoose736
New Member

Joining related tables for purposes of filtering

I have what seems like a simple problem, but I have so far failed to find an existing solution - apoligies if this exists somewhere already - I cant find it!

 

I need to display historical revenues from several clients. This is no problem on its own, but these clients had monthly minimum billing rates independent from their actual product usage over the time period. 

 

Here is the sample minimum table:

DateCustomerMonthly Minimum
1/1/2021Customer A200
1/1/2021Customer B500
2/1/2021Customer A200
2/1/2021Customer B500
3/1/2021Customer A200
3/1/2021Customer B500
4/1/2021Customer A200
4/1/2021Customer B500
5/1/2021Customer A200
5/1/2021Customer B500
6/1/2021Customer A200
6/1/2021Customer B500
7/1/2021Customer A200
7/1/2021Customer B500
8/1/2021Customer A200
8/1/2021Customer B500
9/1/2021Customer A200
9/1/2021Customer B500
10/1/2021Customer A200
11/1/2021Customer A200
12/1/2021Customer A200

 

In addition, I have the actual usage data in the following format:

DateCustomerProductRateVolumeRevenue
1/1/2021Customer AProduct 10.0573336.65
1/1/2021Customer AProduct 20.0849139.28
1/1/2021Customer AProduct 30.0272414.48
2/1/2021Customer AProduct 10.0555627.8
2/1/2021Customer AProduct 20.0849539.6
2/1/2021Customer AProduct 30.0271314.26
3/1/2021Customer AProduct 10.0532216.1
3/1/2021Customer AProduct 20.0863250.56
3/1/2021Customer AProduct 30.024879.74
4/1/2021Customer AProduct 10.0523911.95
sample datacontinues..   

 

I have them joined to a traditional dimdate table like so:

Model.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then I am able to make a visual like this:

mangoose736_0-1660601388175.png

which is great - monthly minimum shows up exactly as intended...BUT when i filter by customer, the monthly minimum does not filter with it - for example, here is the same visual for "Customer B" only:

mangoose736_1-1660601466397.png

I have tried adding additional relationships but nothing seems to work...is there a best practice for this type of situation?

1 ACCEPTED SOLUTION
Seanan
Solution Supplier
Solution Supplier

Hi @mangoose736 

What I've done is create a new table to pull in only the customer value from the smpldata table

 

smpldatarelationship = ALL(smpldata[Customer])

 

From there I created a relationship between the revmin and newly created table.

PBIDesktop_OYrFAgActm.png

 

 

 

Replace your slicer value with the new table 'Customer' column and you will now be able to filter between the different customers with your graph responding correctly.

PBIDesktop_Z4wPQwuuKP.png

 

 

PBIDesktop_ACrNT7Ainc.pngPBIDesktop_iYre5jNmI6.png

 

 

 

View solution in original post

4 REPLIES 4
Seanan
Solution Supplier
Solution Supplier

Hi @mangoose736 

What I've done is create a new table to pull in only the customer value from the smpldata table

 

smpldatarelationship = ALL(smpldata[Customer])

 

From there I created a relationship between the revmin and newly created table.

PBIDesktop_OYrFAgActm.png

 

 

 

Replace your slicer value with the new table 'Customer' column and you will now be able to filter between the different customers with your graph responding correctly.

PBIDesktop_Z4wPQwuuKP.png

 

 

PBIDesktop_ACrNT7Ainc.pngPBIDesktop_iYre5jNmI6.png

 

 

 

This is the solution - thank you so much!

Seanan
Solution Supplier
Solution Supplier

Hi @mangoose736 

Have you tried setting the cross filter direction to Both instead of Single? This may fix your issue.

Unfortunately no, I get the same results either way - both or single cross filtering. 

 

I have saved this sample file to onedrive here: https://1drv.ms/u/s!AoFM9U3goeChkbxIF-TWqisTT8iP9Q?e=mdgjJe 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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