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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
pbix_users
Frequent Visitor

New Measure Required if for One Row in Matrix is NO, it should present No for all Order Rows.

Hello, Need a measure to present Yes/NO based on condition. If only one is NO in SKU 85 Measure the new measure should present 'NO" for each row. in this case for sales id 0002, i need to present Yes, for each row and in second case for Sales ID 269 need to present "NO" for all rows as we have no against size 30 30. Actually need to use "AND GATE"Rules, for Open all values should be "Yes" if one of the value is NO it should be NO against all rows. (SKU 85 is also a measure 

SKU 85 = IF([Measure] >0.85 ,"Yes","No")). Need new measure based on (SKU 85).

pbix_users_0-1728384683081.png

 

8 REPLIES 8
v-yajiewan-msft
Community Support
Community Support

Hi @pbix_users , hello Kedar_Pande, thank you for your prompt reply!

 

Please create the measure as shown below:

 

New Measure = 
IF(
    CONTAINSSTRING(
        CONCATENATEX(
            FILTER(ALL('Table'), 'Table'[Sales ID] = MAX('Table'[Sales ID])),
            [SKU 85],
            ""
        ), 
        "No"
    ),
    "No",
    "Yes"
)

 

Result:

vyajiewanmsft_0-1728467803677.png

Best regards,

Joyce

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

Wrong, it should be Yes for sales id 1. and no for 269.

pbix_users_0-1728469305283.png

 

Hi @pbix_users ,


Thank you for your feedback.


If possible, could you please upload your PBIX file for further troubleshooting?

 

Please ensure it contains sample data that doesn’t include any sensitive information.


Thank you for your understanding!

pbix_users
Frequent Visitor

? Need to implement "AND" condition if all rows equal to yes, then "Yes". If one of the row equal to "No" for all rows against particular sales order it should present "NO".

Kedar_Pande
Super User
Super User

Final Result measure:

Final Result = 
IF (
COUNTROWS (
FILTER (
VALUES('YourTableName'[Sales ID]),
CALCULATE(
MIN('YourTableName'[SKU 85])
) = "No"
)
) > 0,
"No",
"Yes"
)

If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande

@Kedar_Pande 

MIN('YourTableName'[SKU 85]) 

SKU85 is also a measure. when i put min against measure, i got an error.

he MIN function only accepts a column reference as the argument number 1.

This measure doesn't works in my case.

 

 

@pbix_users 

Updated Measure:

Final Result = 
VAR _val=[ SKU 85 ]
IF (
COUNTROWS (
FILTER (
VALUES('YourTableName'[Sales ID]),
CALCULATE(
_val = "No"
)
) > 0,
"No",
"Yes"
)

@Kedar_Pande  Same Results, it should be YES, for all rows.

pbix_users_0-1728388740778.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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