Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone,
I am trying to show when a product is sold above or below the Price per Unit. For example if a product is sold for $10 and the minimum is $8, the IF statement should return Above. And if a product is being sold for $6 and the minimum is $8 the IF statement should return Below. I tried using this dax formula but when I put it into the table it removes values from the Price per Unit column and the Lowest Price column. It also seems to add products that have already been filtered out back into the table when adding the Y/N measure. Not sure if it would create an issue but the Lowest price measure pulls from a different dataset but are connected through relationship.
These are the DAX formulas I've created.
The rows that have $15 should be Above and the rows that are $0.01 should be Below
With the added Y/N measure
Thank you for the help!
Solved! Go to Solution.
@Anonymous sorry missed the comma (,) after TRUE
Y/N =
VAR __priceperUnit = [Price Per Unit]
VAR __lowestprice = [Lowest Price]
RETURN
SWITCH ( TRUE(),
__priceperUnit == BLANK() || __lowerprice == BLANK(), BLANK(),
__priceperUnit < __lowestprice, "Below",
"Above"
)
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous that shouldn't matter if there is a common dimension between these two tables. Not sure how the data model is setup
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k hmmm weird. I thought I had created the relationship the right way I'll have to do some more digging around in the data. Thanks for the help!
@Anonymous sorry missed the comma (,) after TRUE
Y/N =
VAR __priceperUnit = [Price Per Unit]
VAR __lowestprice = [Lowest Price]
RETURN
SWITCH ( TRUE(),
__priceperUnit == BLANK() || __lowerprice == BLANK(), BLANK(),
__priceperUnit < __lowestprice, "Below",
"Above"
)
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi again @parry2k ,
I think I may have spoke too soon 😅. It looks like it is just the Below part that isn't quite matching up. Would the issue casuing this be because data is coming from two different data sources? Thank you for the help!
@Anonymous try this, you need to check blank()
Y/N =
VAR __priceperUnit = [Price Per Unit]
VAR __lowestprice = [Lowest Price]
RETURN
SWITCH ( TRUE()
__priceperUnit == BLANK() || __lowerprice == BLANK(), BLANK(),
__priceperUnit < __lowestprice, "Below",
"Above"
)
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k ,
I am trying to use your formula but it is throwing a syntax error on the __priceperUnit in row 6. I'm not quite sure what I'm missing or why its not working. I tried renaming it but no luck there. Thank you for the help!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.