cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Create a table from existing relationship

Hi.

I can create a table visual from two related tables. But how can I create a table from them? For example, I have two related tables:

 

Category                                    Sales

Category  Discount                   Category     Date   ProductID  Amount

A               10%                          A                  ...        123            100

B                20%                         B                  ...        124             200

                                                  A                  ...        123              50

 

I need a table (not visual), that includes ProductID and Discount. I need to construct such table because I then need to crossjoin it with another table.

 

               

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Post Partisan
Post Partisan

Re: Create a table from existing relationship

Well, this can be achieved this way:

 

Table 1 = SELECTCOLUMNS(Sales,"ProductID",Sales[ProductID],

                                      "Discount",LOOKUPVALUE(Category[Discount],Category[Category],Sales[Category]))

                                      

View solution in original post

1 REPLY 1
Highlighted
Post Partisan
Post Partisan

Re: Create a table from existing relationship

Well, this can be achieved this way:

 

Table 1 = SELECTCOLUMNS(Sales,"ProductID",Sales[ProductID],

                                      "Discount",LOOKUPVALUE(Category[Discount],Category[Category],Sales[Category]))

                                      

View solution in original post

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors