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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Simple_one
Helper I
Helper I

Need help a dax for calculating bonus

Hello everyone,

 I have a table Package Course :

Simple_one_0-1691574272116.png

And a table Bonus :

Simple_one_1-1691574308709.png

 I have a table :

Simple_one_2-1691574386380.png

 I have to calculate bonus for people as :

Example : 

Bao Quoc Thang  :

Simple_one_3-1691574555655.png

Bonus = (2 * 150000) + (2*300000)+(8*400000)= 4900000

This is a link for power BI file : https://drive.google.com/file/d/1TQUGX8Ma0MUN6ZdAqfSB3Ml3BTF_aUKh/view?usp=drive_link 

 Please someone help me for this dax.

 

2 ACCEPTED SOLUTIONS
cosm
Resolver II
Resolver II

Hi @Simple_one .

Try this approach:

1) Add the following measure:

 

Bonus (#new student * Bonus pr student) =
 // Multiply the bonus and the # of New student, then take the sum
    SUMX( Bonus, Bonus[Bonus]  *
        Data[# of New Student]
)

 

The measure above use SUMX to multiply the two columns from two different tables.

2) Add the measure to a table/matrix or similar to obtain the bonus for each user name.

See snip below

cosm_1-1691576701281.png

 

 

Hope this helps.

If the answer solved your problem, consider accepting it as a solution.


View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

1) in the DATA table create the following column

Screenshot_1.png

2) and then calculate like this

Screenshot_2.png

cosm
Resolver II
Resolver II

Hi @Simple_one .

Try this approach:

1) Add the following measure:

 

Bonus (#new student * Bonus pr student) =
 // Multiply the bonus and the # of New student, then take the sum
    SUMX( Bonus, Bonus[Bonus]  *
        Data[# of New Student]
)

 

The measure above use SUMX to multiply the two columns from two different tables.

2) Add the measure to a table/matrix or similar to obtain the bonus for each user name.

See snip below

cosm_1-1691576701281.png

 

 

Hope this helps.

If the answer solved your problem, consider accepting it as a solution.


Hi @cosm ,

Thank you a lot

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.