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
dofrancis3
Resolver I
Resolver I

Conditional Sum calcution between two tables

Dear Team,
Please i need your help !
I would like to calculate the PERCENTAGE as per the formula below : by country, Year and Quarter.
The sample Excel data can be found Here.
Thank you for your support 
 
dofrancis3_0-1739531669549.png

 

3 REPLIES 3
BeaBF
Super User
Super User

@dofrancis3 Hi! Create a measure like:

D1_Percentage =
VAR Z_Value = LOOKUPVALUE( Table1[Z], Table1[Country], SELECTEDVALUE(Table2[Country]) )
RETURN DIVIDE( Table2[D1a] + Table2[D1b], Z_Value, 0)

D9_Percentage =
VAR Z_Value = LOOKUPVALUE( Table1[Z], Table1[Country], SELECTEDVALUE(Table2[Country]) )
RETURN DIVIDE( Table2[D9], Z_Value, 0)

MC1_Percentage =
VAR U_Value = LOOKUPVALUE( Table1[U], Table1[Country], SELECTEDVALUE(Table2[Country]) )
RETURN DIVIDE( Table2[MC1], U_Value, 0)

-- Repeat for other percentages using the same pattern

 

BBF

Dear @BeaBF ;

Please could you check again it doen't work it give me 0% will i have data

Please advise

dofrancis3_0-1739548712244.png

 

Anonymous
Not applicable

Hi @dofrancis3 ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

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.