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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
powerbi_Mandal
Frequent Visitor

How to multiply percentage from dimension table with amount from fact table - many to many relation

Hi,

 

I have a problem getting the appropriate data from my DAX formula. 

Here's my model:

fact
dimBank
dimSecurites
Fact table is a day to day table with debt amortization plan ordered by tranche (%dimSecurities)

dimSecurities is a table with all specific data for the vessel, each having unique key %dimSecurities

dimBank is a table where the split between multiple banks, where a %dimSeucrities sometimes occur 3-4 times depending on how many banks involved
This is a simplified version of my data model:

powerbi_Mandal_1-1699607341156.png

 

 

Looking at this table, the data is correct when I add other dimensions, like "Share" or even better "%dimSecurities", but the total sum is incorrect as it is a result of the average share multiplied by total debt... 

powerbi_Mandal_0-1699607146094.png
However, I would like to show these data graphical in a barchart, but then I cannot add the aggregation, hence the total sum is being used, wich is incorrect, 12,017,545 when the correct sum should be more like 7,961..... etc

powerbi_Mandal_2-1699607616687.png

 

This is my DAX formula... 

debt by lenders = CALCULATE(SUMX('factSecurity',factSecurity[Loan Balance Start] * LOOKUPVALUE(dimT16_Valutakurs[Currency Rate], dimT16_Valutakurs[Dates], Max('Calendar'[Date]), dimT16_Valutakurs[FRA_VAL_KODE], factSecurity[Currency])), FILTER(factSecurity, factSecurity[Dates] = Max('Calendar'[Date])))* AVERAGEX(dimBankAndGuarantor, dimBankAndGuarantor[Share])

Any help is much appreciated 🙂

Thanks 
E
1 ACCEPTED SOLUTION
Rupak_bi
Impactful Individual
Impactful Individual

To get correct sum, you need to do the caculation in column, not in measure. column sum will work as expected.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

View solution in original post

2 REPLIES 2
Rupak_bi
Impactful Individual
Impactful Individual

To get correct sum, you need to do the caculation in column, not in measure. column sum will work as expected.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Thanks!! 

powerbi_Mandal_0-1699611804581.png

 

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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