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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
asunkavalli
New Member

How to create get a desired Value from a filtered result and change all the rows

Hi,

 

I am trying to change or input a value based on the filtered result and then look at all the rows. 

 

For example:

 

As you can see below, ID 1 and item 10 may have different possible CONCAT2 values and the trasnformed value of X Y Z, if the result in the CHECK = TRUE, then I want all the lines since they are ID: 1 and ITEM: 10, the desired result for all rows to be "GOOD"

 

 

If you see ID: 3 and Item 10, it has both the CHECK as False, so I want all the lines in the desired result to show up as "NOT GOOD" for those 2 rows with ID 3 and Item 10. 

 

IDID ITEMCONCAT 2CONCAT3CHECKDesired Result
110AXFALSEGOOD
110BYFALSEGOOD
110CZTRUEGOOD
210DXFALSEGOOD
210EZTRUEGOOD
310FXFALSENOT GOOD
310GYFALSENOT GOOD

 

I am trying to find out how I can do this in PowerBI, any suggestions? 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @asunkavalli ,

 

Sample for your reference.

 

RESULT = 
VAR result =
    CONTAINS (
        FILTER (
            Table1,
            Table1[ID] = EARLIER ( Table1[ID] )
                && Table1[ID ITEM] = EARLIER ( Table1[ID ITEM] )
        ),
        Table1[CHECK], TRUE ()
    )
RETURN
    IF ( result = TRUE (), "GOOD", "NOT GOOD" )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @asunkavalli ,

 

Sample for your reference.

 

RESULT = 
VAR result =
    CONTAINS (
        FILTER (
            Table1,
            Table1[ID] = EARLIER ( Table1[ID] )
                && Table1[ID ITEM] = EARLIER ( Table1[ID ITEM] )
        ),
        Table1[CHECK], TRUE ()
    )
RETURN
    IF ( result = TRUE (), "GOOD", "NOT GOOD" )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

WOW you are a genius sir! Thank you! I really appreciate your help! It worked magically. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.