This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Solved! Go to Solution.
Hi @eunji888888
For your question, here is the method I provided:
Here's some dummy data
"SO"
"CustGroup4 Material"
I have made changes to your code as follows:
Measure StdPrice =
VAR EANValue = SELECTEDVALUE('CustGroup4 Material'[#EAN])
VAR ChannelValue = SELECTEDVALUE('SO'[Channel Description])
VAR CustGroup = SELECTEDVALUE('CustGroup4 Material'[#CustGroup4_Channel Description])
VAR TradeDiscountPrice =
CALCULATE(
MAXX(
FILTER(
ALLEXCEPT('CustGroup4 Material', 'CustGroup4 Material'[#EAN]),
RIGHT('CustGroup4 Material'[#ConditionType Description], 1) = "%" &&
'CustGroup4 Material'[#CustGroup4_Channel Description] = ChannelValue
),
'CustGroup4 Material'[StdPrice]
),
'CustGroup4 Material'[Promotion yes/no] = "Promotion Disc"
)
RETURN TradeDiscountPrice
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @eunji888888
For your question, here is the method I provided:
Here's some dummy data
"SO"
"CustGroup4 Material"
I have made changes to your code as follows:
Measure StdPrice =
VAR EANValue = SELECTEDVALUE('CustGroup4 Material'[#EAN])
VAR ChannelValue = SELECTEDVALUE('SO'[Channel Description])
VAR CustGroup = SELECTEDVALUE('CustGroup4 Material'[#CustGroup4_Channel Description])
VAR TradeDiscountPrice =
CALCULATE(
MAXX(
FILTER(
ALLEXCEPT('CustGroup4 Material', 'CustGroup4 Material'[#EAN]),
RIGHT('CustGroup4 Material'[#ConditionType Description], 1) = "%" &&
'CustGroup4 Material'[#CustGroup4_Channel Description] = ChannelValue
),
'CustGroup4 Material'[StdPrice]
),
'CustGroup4 Material'[Promotion yes/no] = "Promotion Disc"
)
RETURN TradeDiscountPrice
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
To ensure that the MAX(tradediscountprice) function considers only the CustGroup and filters by the selected Channel Description, you need to incorporate the Channel Description filter in your calculation. Here’s how to modify your DAX code: Include Channel Description as a filtering condition in the CALCULATE function. Use the ALLEXCEPT function with Channel Description as an additional parameter to keep it in the current context.
StdPrice =
VAR EANValue = SELECTEDVALUE('CustGroup4 Material'[#EAN])
VAR ChannelValue = SELECTEDVALUE('SO'[Channel Description])
VAR CustGroup = SELECTEDVALUE('CustGroup4 Material'[#CustGroup4_Channel Description])
VAR TradeDiscountPrice =
CALCULATE(
MAXX(
FILTER(
ALLEXCEPT(
'CustGroup4 Material',
'CustGroup4 Material'[#EAN],
'CustGroup4 Material'[#CustGroup4_Channel Description],
'SO'[Channel Description] // Keep Channel Description in context
),
RIGHT('CustGroup4 Material'[#ConditionType Description], 1) = "%"
),
'CustGroup4 Material'[StdPrice]
),
'CustGroup4 Material'[Promotion yes/no] = "Promotion Disc",
'SO'[Channel Description] = ChannelValue // Filter for selected Channel Description
)
RETURN TradeDiscountPrice
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 24 | |
| 23 |