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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
RAVICHANDRA
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"
RAVICHANDRA_0-1680429058446.png 
(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

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

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

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

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

andhiii079845
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

 

andhiii079845_0-1680433082838.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.