Forum Discussion

rkgundabhat's avatar
rkgundabhat
Helper I
2 years ago
Solved

Percent Measure

Hello, I am working with a table with columns Item, _and sales. Somes of the items has 0 sales. I need a measure which I use to show in a data card which shows the percent of items with 0 sales for ...
  • v-zhangti's avatar
    v-zhangti
    2 years ago

    Hi, rkgundabhat 

     

    You can try the following methods.

    Measure = 
    Var _N1=CALCULATE(COUNT('Table'[Item]),FILTER(ALLEXCEPT('Table','Table'[Department]),[Sales]=0))+0
    Var _N2=CALCULATE(COUNT('Table'[Item]),ALLEXCEPT('Table','Table'[Department]))+0
    Return
    DIVIDE(_N1,_N2)

    Is this the result you expect? Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.