Forum Discussion

Chanleakna123's avatar
Chanleakna123
Post Prodigy
7 years ago
Solved

Column Calculation not get right

Hi All ,    I have such below Table , Column of Purchase/No PUrchase ; Count are calculated in Edit Query , as of result this is the table  :  Customer Code  Customer Name  Date Value  Purc...
  • v-cherch-msft's avatar
    v-cherch-msft
    7 years ago

    Hi Chanleakna123 

     

    Please check below dax.

    Count = 
    CALCULATE (
        COUNT ( 'Energy Drink'[Customer Name - Store host code] ),
        FILTER (
            ALLSELECTED ( 'Energy Drink' [Customer Name - Store host code]),
           [Repurchased/No Repurchased]= SELECTEDVALUE('Re-Purchased/No Repurchased'[Type])
        )
    )

    Regards,

    Cherie