Forum Discussion

Applicable88's avatar
Applicable88
Impactful Individual
3 years ago
Solved

Calculated column with multiple conditions

Hello,

 

my sample table looks like this: 

Material Specification
3M12345 AAA
1234 BBB
3M6543 AAA
3234 AAA
5324 BBB
3M9876 CCC
3M5555 VVV

 

I need a calculated table of the the Materials, but only with a specification of AAA, BBB and VVV, not the CCC's

Additional, regarding the AAA's I only want those filtered which starts with "3M.... ". BBB and VVV should display all Materials.

 

Thank you very much in advance.

Best. 

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    New Table = 
    FILTER (
        Data,
        Data[Specification]
            IN { "BBB", "VVV" }
                || AND ( Data[Specification] = "AAA", LEFT ( Data[Material], 2 ) = "3M" )
    )

     

     

1 Reply

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    New Table = 
    FILTER (
        Data,
        Data[Specification]
            IN { "BBB", "VVV" }
                || AND ( Data[Specification] = "AAA", LEFT ( Data[Material], 2 ) = "3M" )
    )