Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Share based on total for specific value

Hello,   I have the following matrix: I have a column in my table named "Exists" which has value "1" if a brand exists in a store. I want to calculte the Share for each store compared to the Count...
  • v-juanli-msft's avatar
    6 years ago

    Hi Anonymous 

    Create measures

    total exsits = SUM('Table'[exsits])
    
    exsits in country = CALCULATE(SUM('Table'[exsits]),FILTER(ALLSELECTED('Table'),'Table'[market]="country"))
    
    % = [total exsits]/[exsits in country]

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.