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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Relationship column & table name

Hi all, 

 

I am working on a Power Bi dashboard and I would like to add a slicer based on values from the table names. My data sets looks something like this:

 

Table 1 contains(company 1/Donald)

DateSalesSales last year#InventoryCompany name

1-1-2020

1,2344,3212Donald
2-1-20202,3453,2194Donald
3-1-20203,4562,1988Donald
4-1-20204,5671,98716Donald

 

Table 2 contains(company 2/Kwik)

DateSalesSales last year#InventoryCompany name

1-1-2020

5,6789,87632Kwik
2-1-20206,7898,76564Kwik
3-1-20207,8917,654128kwik
4-1-20208,9126,543256Kwik

 

Currently I make a relationship between the "date" colums, by doing so I can make charts with sales, sales last year and inventory levels. Every table contains data derived from a single company (75+). However, I would like to build the following:

Capture.PNG

 

Adding slicers based on company name and attribute to be shown. I tried to add an additional 'attribute' and 'company list' table. However, I don't succeed to make a correct relationship between all tables. Thank you in advance. 

 

Haas

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

You can append these table and do analysis

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

If required you can create company and date dimension.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi guys. 

 

Thanks for all your help! With unpivot 80% of the problem could be solved. Thank you!

lbeneyze
Advocate II
Advocate II

Good evening,

 

Do you havea data model you can share?

 

Based on the information you gave:

  - Append your 2 datasets in powerquery to get one table as proposed by amichandak

  - Duplicate the query and remove duplicates in power query to create a company name dimension:

https://www.youtube.com/watch?v=vjBprojOCzU

  - Create your relationship and your slicer.

 

PS: Maybe good to check this post on how to get your question answered quickly 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Did I answer your question, please mark my post as a solution

If you liked my solution, please give it a thumbs up.

Thank you and keep up the good job!

 

Kind regards,

Lohic Beneyzet

 

Greg_Deckler
Community Champion
Community Champion

Create a central Date table and use this to build relationships between your other two tables

 

"Table 1" *--<>--1 "Date" 1--<>--* "Table 2"

 

Use Date table as the axis of your chart.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

You can append these table and do analysis

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

If required you can create company and date dimension.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.