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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

PowerBi Dax table True False based on multiple rows values

Hello Experts!

Help me to get solution for the below issue, In Power Bi Dax table added calumn with IF condition and getting result like in "F"
(Excel table attached just for reference only)

Currently am able get this!-

If "Stock" is >= "Required" then set to InventoryOk to "True" else set "False";

What I need?

But my requirement is if anywhere in the table with same orderId condition found "False" then all the rows with that OrderId could set "False" (Yellow highlighted should be False for example)

Thankfully -Ravi

Super User
Super User

create a calculated column like this:
Screen Capture #794.png

View solution in original post

Super User
Super User

create a calculated column like this:
Screen Capture #794.png

Super User
Super User

Hi, try this:

Measure = 
VAR _table = SUMMARIZE(ALL('Table'),'Table'[OrderID],'Table'[ItemID],'Table'[Stock],'Table'[Required],"_check",if('Table'[Stock]>='Table'[Required],"ok","not ok"))
VAR _orderID = SELECTEDVALUE('Table'[OrderID])
VAR _filter = IF(COUNTX(FILTER(_table,'Table'[OrderID] = _orderID && [_check] = "not ok"),'Table'[ItemID])>=1,"no ok","ok"
RETURN _filter




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.