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
Anonymous
Not applicable

Need to create a Calculated table based off of two tables

Hi,

 

I need to create a Custom Table based off of two values from two different tables.

 

I have one table with one UNIQUE value (title_id)

I have another table with multiple values (Platform & Title_ID)

 

Basically what I need to do is create a new table based on the DISTINCT value of Platform that match to the Game ID specified in the other table.

 

Here is a picture of my end result in the hopes that it is better than my description, Smiley Happy

Untitled.png

I have been able to create y table based off of the Distinct values of Platform in Table2 by using Table3=DISTINCT(Table2[Platform]) but I need to either have the gameID that references the platform (i.e. Table3 has 2 columns (Platform & GameID) or I need Table3 to only have the one column.

 

Hope that makes sense,

Thanks, Rich

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, try with this:

 

Table3 = CALCULATETABLE(DISTINCT(Table2[Platform]),RELATEDTABLE(Table1)) 




Lima - Peru

View solution in original post

Hi @Anonymous,

 

No, it is not possible. Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections(like a slicer) on the report. Smiley Happy

 

Regards

View solution in original post

5 REPLIES 5
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, try with this:

 

Table3 = CALCULATETABLE(DISTINCT(Table2[Platform]),RELATEDTABLE(Table1)) 




Lima - Peru
Anonymous
Not applicable

Unfortunately, that did not work.  I am getting a column in my new table called PLATFORM but the value shows UNKNOWN:Untitled2.png

Hi @Anonymous,

 

Based on my test, the formula provided by @Anonymous works fine against your sample data?

 

t1.PNG

 

Is there any relationship between these two tables in your mode? Could you share a sample pbix file which can reproduce the issue, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. Smiley Happy

 

Regards

Anonymous
Not applicable

Yes you are right. it works!!  I checked the relationships again and entered the calculated table function and it worked, 🙂

Thanks for all your help.

 

I have another question though which I dont think is possible... maybe through a filter?  But is there a way that I can have the [Game_ID] as a filter on my report, and depending on the game ID that has been filtered, it then changes the [Platform] values that are associated to that GameID?

Hi @Anonymous,

 

No, it is not possible. Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections(like a slicer) on the report. Smiley Happy

 

Regards

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.