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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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