Forum Discussion

keylorbb's avatar
keylorbb
New Member
8 years ago
Solved

marketshare

Hello, I have a database of more than 5 million lines with billing information, each line with the customer code that you bought, that is, you can have 1 line for one customer while another customer ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    HI keylorbb,

     

    I' m not so sure which product are yours, I write a sample formula below, maybe you can take a look.

    Measure =
    DIVIDE (
        CALCULATE (
            COUNTROWS ( Table1 ),
            VALUES ( Table1[MES] ),
            Table1[Marca] IN { "CYZONE", "GENERICA" }
        ),
        CALCULATE ( COUNTROWS ( Table1 ), VALUES ( Table1[MES] ) ),
        -1
    )
    

     

    I assume Marca column stored tags to mark owner, "CYZONE", "GENERICA" are yours.

    Values function will auto filter records to let formula calculate on current category, when you use MES column as group column.

     

     

     

    Regards,

    Xiaoxin Sheng