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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to multiply two columns in separate tables

Hi,

 

I have two tables :

  • IRG_ANALYSIS : contains the total of each line
  • IRG_CODES : contains the 'rate' (taux)

They are linked by a merged column

 

IRG_ANALYSIS table :

IRG ANALYSIS.png

IRG_CODE table : 

IRG_CODE.png

When I select my columns, the rate is correctly displayed ("TAUX" column) :

RESULT.png

I would like to multiply "total" by "taux".

I tested this :

TotalIRG = CALCULATE( (SUM(IRG_ANALYSIS[Total]) * (SUM(IRG_CODES[TAUX])) /100 )
)

But the result is not correct : 42 insted of 21.15 (52.87 * 40/100 = 21.15)

RESULT2.png

 

Thanks for your help. 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Solved by using :

 

TotalIRG =
SUMX ( IRG_ANALYSIS, IRG_ANALYSIS[Total] * RELATED ( IRG_CODES[TAUX] ) / 100 )

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Solved by using :

 

TotalIRG =
SUMX ( IRG_ANALYSIS, IRG_ANALYSIS[Total] * RELATED ( IRG_CODES[TAUX] ) / 100 )

 

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Hi @amitchandak 

I updated my post, something wrong happened (every screenshots have been deleted ..)

Thanks

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.