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
babukumarg
Frequent Visitor

How to create a measure that involves another measure and lookup value.

Hi,

 

We need to create a measure to calculate the Commission for salesperson based on the percent confiured for each salesperson by customer and product group (Table A). we have the sales data stored by customer and product in a table (Table B) and built a measure for the total sales which involves lot of calculation based on other data we have for every sales person.

 

We now need to calculate the Commission for each salesperson based on the Total sales measure and the Commission percent from TABLE A. We are stuck here as it is not possible to use lookupvalue when we need to use a measure in the calculation.

 

How can we achieve this?

 

Thanks.

 

 

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

It's difficult to answer without seeing your set up. If your discount is in one table and sales in another (hopefully related table) you can try:

SUMX(
        VALUES( 'Table A'[Discount]), 
        var _discount = 'Table A'[Discount]
        var _salesamt = [Sales Measure]
   return
      _salesamt * (1- _discount)

 

I hope this works!

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @babukumarg ,

I have create a simple sample. Please refer to my pbix to see if it helps you.

Create a relationship between the two tables.

vpollymsft_0-1646103860283.png

Then create a measure.

Measure = [Commission]*MAX(A[percent])

vpollymsft_1-1646103909475.png

If I have misunderstood your meaning, please provide your pbix without privacy information  and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Whitewater100
Solution Sage
Solution Sage

Hi:

It's difficult to answer without seeing your set up. If your discount is in one table and sales in another (hopefully related table) you can try:

SUMX(
        VALUES( 'Table A'[Discount]), 
        var _discount = 'Table A'[Discount]
        var _salesamt = [Sales Measure]
   return
      _salesamt * (1- _discount)

 

I hope this works!

Hi @Whitewater100,

 

I have given the model diagram below in my reply to @amitchandak response. Hopefully that explains my problem. I'll try your suggestion.

amitchandak
Super User
Super User

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

 

One way is to bring commission % in the table having sales

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak See below the partial model diagram that is required for this calculation. I'm not sure if I can get you the data. Total Sales Measure is based on the data in the Table highlighted Yellow. Commission percent is available in the table highlighted green. It is not possible to bring the percent into the sales table as more than one salesperson will be compensated for the a sale. 

Partial ModelPartial Model

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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