Forum Discussion

rohitjmd's avatar
rohitjmd
Helper II
7 years ago
Solved

column dax formula

can anyone help me implementing below in power bi. i want to add a column "inconsideration" where value should be yes if all product type of the product received "good" feedback otherwise it should b...
  • hnguy71's avatar
    7 years ago

    Try this in a calculated column. Substitute 'Table' for your actual table name:

    Inconsideration =
    IF (
        CALCULATE (
            COUNT ( [Observation] ),
            'Table'[Observation] = "Bad",
            FILTER ( 'Table', [Product] = EARLIER ( [Product] ) )
        ) > 0,
        "No",
        "Yes"
    )
  • parry2k's avatar
    parry2k
    7 years ago

    rohitjmd or add this expression for calculated column

     

    Inobservation = 
    VAR __observation = CALCULATETABLE( VALUES( 'Product'[Observation] ), ALLEXCEPT( 'Product', 'Product'[Product] ) )
    RETURN
    IF( "Bad" IN __observation, "No", "Yes" )