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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
aishak12
Helper IV
Helper IV

Create new column based on relationship in another SQL View

Hello,

 

I have two SQL views one for Actual and the other is Budgeting data. These views both contain a column Period with data from 2020 01 - 2021 12.

 

In the SQL View (Actual) I have a column for MonthPassed that is 1 or 0 based on the Period. I want to add this column to the Budgeting view in PowerBI. 

 

For example if Period (202001) = MonthPassed (1) it should have the same relationship in the Budgeting view. 

 

Actual: 

 

aishak12_1-1617290482118.png

 

Budgeting

 

aishak12_2-1617290677360.png

 

Is this possible to add in PowerBI if so how should I approach this for the relationship to reflect the same values. 

 

 

Thank you

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @aishak12 ,

 

I think it is possible. I did the following test and created two tables. The Period and Monthpass fields are from different tables. In powerbi query, I only need to add the same index to the two tables respectively, and then merge into one table according to the index, and finally get the budget table successfully.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get Budgeting result

v-henryk-mstf_3-1617700923116.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

22 REPLIES 22
Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-to-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. Point-by-month fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. The period and month step-by-step fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. The Period and month step fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into an index-based table and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps, consider Accepting it as the solution to help other members find it faster.

Syndicate_Admin
Administrator
Administrator

Don't @aishak12,

I think it's possible. I did the next test and created two boards. The Period and Month Step fields come from different tables. In the powerbi query, I just need to add the same index to the two tables respectively, and then merge into a table based on the index, and finally get the budget table correctly.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get budgeting result

v-henryk-mstf_3-1617700923116.png


If the issue has not yet been resolved, provide detailed error information and let me know immediately. We look forward to your response.

Best regards
henry

If this post helps,then consider Accepting it as the solution to help other members find it faster.

v-henryk-mstf
Community Support
Community Support

Hi @aishak12 ,

 

I think it is possible. I did the following test and created two tables. The Period and Monthpass fields are from different tables. In powerbi query, I only need to add the same index to the two tables respectively, and then merge into one table according to the index, and finally get the budget table successfully.

v-henryk-mstf_0-1617700613319.pngv-henryk-mstf_1-1617700632136.png

v-henryk-mstf_2-1617700857181.png

get Budgeting result

v-henryk-mstf_3-1617700923116.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.