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

How can i create a column in power BI based on this query

select * from Y A
RIGHT JOIN X B
ON A. uniqueKEY=B. uniqueKey
where relatedtable ='maze'

 

4 REPLIES 4
Sujit14496
Resolver I
Resolver I

You can use your query to get your table and not a column .
so what i suggest is using this query and getting it as an table and get an index with it too .

Use that index as a key to relate with your other table where you wanted this column to be in .

there are many commands like relatedtable which you can use to perform further anlaysis

Anonymous
Not applicable

could you please  be kind enough and  provide sample  code  based on what you  are recomending using  my code  i have provided here i

hello @Anonymous  , 
I dont beleive its possible to create a calculated columnn using SQL query . 

but i do beleive that you can query a table using SQL and transform it into a seperate table with index which matches indexes with the main table.

 

So connecting main table (where you need the column) and queried table can be connected throiugh relationship in model tab of power bi desktop

Anonymous
Not applicable

could you  please offer a demo code based on my sample query here?

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.

Top Solution Authors