Forum Discussion

jrpoli2000's avatar
jrpoli2000
Frequent Visitor
8 years ago
Solved

Help with calculated column

I got an invoice table listing all its items, I need a calculated column to identify whether the invoice contains only a SINGLE or MIXED category based on the category column. Below is the sample and...
  • Zubair_Muhammad's avatar
    8 years ago

    HI jrpoli2000

     

    Try this

     

    Status =
    IF (
        CALCULATE (
            DISTINCTCOUNT ( Table1[CATEGORY] ),
            ALLEXCEPT ( Table1, Table1[INVOICE NUMBER] )
        )
            > 1,
        "MIXED",
        "SINGLE"
    )