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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
CRSB
Regular Visitor

Dax measure that checks if one row meets criteria, put value for all rows

Looking for assistance for a measure for the last column in example below, if a hub building has inventory, show yes for all buildings that fall under that hub. 

 

BuildingBuilding TypeServicing HubInvHub Has Inv.
AHubA10Y
BTradA8Y
CTradA5Y
DHubD0N
ETradD10N
FTradD2N
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CRSB ,

For your proposed new table, I have also created a table.

vyilongmsft_0-1723098361592.png

I think you can create the following DAX code for your needs.

Column = 
IF (
    'Table'[Servicing Hub] = "A"
        && 'Table'[Item] = "A"
        && 'Table'[Inv] > 0,
    "Y",
    "N"
)

vyilongmsft_1-1723098424307.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
ThxAlot
Super User
Super User

ThxAlot_0-1722996437360.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



this worked, but i forget one of my tables has item # as a column, so how could i modify to check if the hub/item combonation has inventory?

Flag = 
IF(CALCULATE(
  MIN(Table[Inv]),
    ALLEXCEPT( Table, Table[Servicing Hub] ),Table[Building Type]="HUB",Table[Item Column]="Your Condition"
)=0,FALSE(),TRUE())


Regards,
Sachin
Check out my Blog

I can't get this to work, what is the "Your Condition"?

 

below would be the table 

 

BuildingBuilding TypeServicing HubItemInvHub Has Inv.
AHubAA10Y
BTradAA8Y
CTradAA5Y
DHubDB0N
ETradDB10N
FTradDB2N
AHubAC0N
GTradAC10N

"Your Condition" was a placeholder.

Because you hadnt mentioned the condition that you would like to check.So just replace "Your Condition" the value that you would want to check.



Regards,
Sachin
Check out my Blog
Anonymous
Not applicable

Hi @CRSB ,

For your proposed new table, I have also created a table.

vyilongmsft_0-1723098361592.png

I think you can create the following DAX code for your needs.

Column = 
IF (
    'Table'[Servicing Hub] = "A"
        && 'Table'[Item] = "A"
        && 'Table'[Inv] > 0,
    "Y",
    "N"
)

vyilongmsft_1-1723098424307.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Shravan133
Super User
Super User

try this: 

Hub Has Inv =
VAR HubWithInv =
CALCULATE(
MAX('Table'[Inv]),
FILTER(
ALL('Table'),
'Table'[Servicing Hub] = MAX('Table'[Servicing Hub])
)
)
RETURN IF(HubWithInv > 0, "Y", "N")

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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