Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Categorize a field based on multiple lines

Hello everyone I need your support, I have to do the categorization of a ballot, which can bring several products that can be of different categories, such as pharma, bycp, wellnes.

What I need is that for example if a ballot was only sold farma tell me farma, if I buy pharma and bycp say mixed. Do you know what formula it takes to do that?

matihernandez94_0-1645044481983.png

  • Syndicate_Admin , Create a new column like


    New column =
    var _cnt = calculate(distinctCOUNT(Table[Category_COMERCIAL]), filter(Table, [ORDEN] =earlier([ORDEN]) ))
    return
    if(_cnt =1, [Category_COMERCIAL], "Mixed")

1 Reply

  • Syndicate_Admin , Create a new column like


    New column =
    var _cnt = calculate(distinctCOUNT(Table[Category_COMERCIAL]), filter(Table, [ORDEN] =earlier([ORDEN]) ))
    return
    if(_cnt =1, [Category_COMERCIAL], "Mixed")