cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aditya369
Frequent Visitor

Please help me on below scenario

hi team,please help me on this.

 

Invoice IDInvoiceQTYReceived3way/NoFinal Result
1231113wayno
123010Nono
1230003wayno
1240003way3way
1240003way3way
1241113way3way

 

Note : i need final Result column as the output.

 

Condition : if the invoice ID = 123 and any one of that ID row  exist in 3way/No = No then entire rows of that ID should "no" otherwise 3way.

 

please help me on this.TIA.

1 ACCEPTED SOLUTION

Okay,

Final Result = 
VAR c =
    COUNTROWS (
        FILTER (
            'Table',
            EARLIER ( 'Table'[Invoice ID] ) = 'Table'[Invoice ID]
                && 'Table'[3way/No] = "No"
        )
    )
RETURN
    IF ( c = 1, "no", "3way" )

Watsky_0-1664814567508.png

Next time please make sure to give all of your conditions in your initial request so that we can get the full extent of what you're trying to do.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

View solution in original post

5 REPLIES 5
Watsky
Super User
Super User

Hey @aditya369 ,

Try this 

 

Final Result = IF('Table'[Invoice ID]=123,if('Table'[3way/No] = "No","no","no"),"3way")

 

Watsky_1-1664810654383.png

 

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Hi,thanks for the response. i have too many rows with different id's so i need solution in dynamically not in static.can you please modify the code.

Okay,

Final Result = 
VAR c =
    COUNTROWS (
        FILTER (
            'Table',
            EARLIER ( 'Table'[Invoice ID] ) = 'Table'[Invoice ID]
                && 'Table'[3way/No] = "No"
        )
    )
RETURN
    IF ( c = 1, "no", "3way" )

Watsky_0-1664814567508.png

Next time please make sure to give all of your conditions in your initial request so that we can get the full extent of what you're trying to do.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Thank you so much watsky for the quick response and thanks for the support.

It's my pleasure! I'm happy I could find a solution for you!


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.