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
msommerf
Helper III
Helper III

Calculate discounted rate from discount table

Hi, please could somebody help with the following?

I am attempting to work out a discount to be applied to my total sales as follows:

 

I have a rebate table:

Manufacturer     £0     £10     £20     £30     £40     £50

Man 1                 0%     0%     1%      1%      2%     2%

Man 2                 0%     0%      0%      0%      1%     1%

 

So for Man 1.........

If sales between £0 and £9.99 - 0% discount applied

If sales between £20 and £29.99 - 1% discount applied

Etc..

 

I have another table which shows my total sales:

 

Manufacturer     Units     Total Sales   Rebate

Man 1                    2           £25             ?

Man 2                    1           £60             ?

 

I would like to be able to take my total sales figure and look up the discount to be applied using the rebate table.

So for Man 1 with sales of £25 I would see a discount of 1% and for Man 2 a discount of 1%.

 

I am just getting started with DAX so any help appreciated.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@msommerf ,

 

You may select Unpivot Columns in Query Editor first, then refer to the post below.

https://community.powerbi.com/t5/Desktop/Find-last-value-based-on-date/m-p/293150#M129228

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@msommerf ,

 

You may select Unpivot Columns in Query Editor first, then refer to the post below.

https://community.powerbi.com/t5/Desktop/Find-last-value-based-on-date/m-p/293150#M129228

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.