Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Find multiple rows with different values in another column

I have a table with a lot of articles connected to an order and also a Location, I want to find orders that contains article from more than one location, see sample below

 

Order numberArticleLocation
12345AX
12345BX
12345CY
23456CY
34567AX

34567

BX
34567DX

 

What I want to achive:

OrdernumberMultiple locations
12345Yes
23456No
34567No

 

 

What is the easiest way to do this in Power BI?

  • Anonymous add following measure

     

    Multiple Lcoations = 
    IF ( CALCULATE ( DISTINCTCOUNT( Orders[Location] ), ALLEXCEPT ( Orders, Orders[Order number] )  ) > 1, "Yes", "No" )

     

1 Reply

  • Anonymous add following measure

     

    Multiple Lcoations = 
    IF ( CALCULATE ( DISTINCTCOUNT( Orders[Location] ), ALLEXCEPT ( Orders, Orders[Order number] )  ) > 1, "Yes", "No" )