Forum Discussion

v-manonc's avatar
v-manonc
Frequent Visitor
7 years ago

Divide one count column by total count

Hi All, Im new to BI and had a quesiton how to callucleate the total count / total count example as given

 

Froot       count(froot)    measure = divide[count]/sum[count]        - Not working...

apple        20                  22%     (20/90)

mango     30                  33%    (30/90)

grapes      40                  44%     (40/90)

 

Where i taken a measure = count(froot) 

 

 

7 Replies

  • Hi v-manonc , you can use the next code for calculated column, not measure:

     

    result = Fruits[Count]/SUM(Fruits[Count])

    Best Regards,
    Miguel

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

    • v-manonc's avatar
      v-manonc
      Frequent Visitor

      Its not working

       

      my raw data is apple, apple, apple, mango, mango, etc.. 

       

      i taken a new measure countoftotal = count(fruits)  

      now i need percentage% = [countoftotal] / sum[countoftotal]    - tried not working