Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have a table (A) with a column for a date month, and a column with a static value per each month.
On the other hand, I have a table (B) cost and date month.
I want to create a new calculated column as follow:
Column = A[staticValue]*B[cost].
Example:
A
02/2021 23.4
03/2021 3.5
B
02/2021 2500
03/2021 1400
CalcultatedColum:
23.4*2500
3.5*1400
Thank you in advance
Solved! Go to Solution.
Hi @jmmariscal
you can create a relationship between the two tables using month-year column from both tables. It looks from the example you've provided that this relationship shall be one-one relationship.
then you can use the following code to create the calculated column:
If the coulm is in table A:
Column = A[staticValue] * RELATED ( B[cost] )
if the column is in table B:
Column = B[cost] * RELATED ( A[staticValue] )
please try to create the relationship and let me know if you need any help.
Hi @jmmariscal
you can create a relationship between the two tables using month-year column from both tables. It looks from the example you've provided that this relationship shall be one-one relationship.
then you can use the following code to create the calculated column:
If the coulm is in table A:
Column = A[staticValue] * RELATED ( B[cost] )
if the column is in table B:
Column = B[cost] * RELATED ( A[staticValue] )
please try to create the relationship and let me know if you need any help.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |