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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply

Find value in another table

Hi 

 

I have a measure which have calculated the total discount on a customer(cust_disc).

 

Given this discount I would like to find from the table below(discounttable) what the turnover should have been at least with this discount. For example with a discount of 48,1% the turnover should be at least 300.000

 

How would you write that measure to find the value 300.000?

 

Dennis_Pedersen_0-1718790270098.png

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Dennis_Pedersen , Try using below DAX

 

Minimum Turnover =
VAR Discount = [cust_disc] // Replace [cust_disc] with your actual measure for calculating the total discount on a customer

RETURN
CALCULATE(
SUM(discounttable[Turnover]),
discounttable[Discount] >= Discount,
FILTER(
ALL(discounttable),
discounttable[Discount] >= Discount
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Dennis_Pedersen , Try using below DAX

 

Minimum Turnover =
VAR Discount = [cust_disc] // Replace [cust_disc] with your actual measure for calculating the total discount on a customer

RETURN
CALCULATE(
SUM(discounttable[Turnover]),
discounttable[Discount] >= Discount,
FILTER(
ALL(discounttable),
discounttable[Discount] >= Discount
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks a lot. That helped me in the right direction.

However I had to ammend it a little, with making a discount from and discount to, to make it work correct.

 

VAR Discount = [Total discount_ %]

RETURN
CALCULATE(
[Amount from],
Discount >=DIM_Segmentering[Discount from],
FILTER(
ALL(DIM_Segmentering),
Discount<DIM_Segmentering[Discount to]
)
)

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.