Forum Discussion

supervkc's avatar
supervkc
New Member
9 years ago
Solved

Percentage with Count Quantity

New user to Power BI here, and I am trying to calculate the percentage of each count of Qty from the total quantity count.   I am missing something in my formula, and my percentages are off.   I ...
  • v-qiuyu-msft's avatar
    9 years ago

    Hi supervkc,

     

    In your scenario, you can create a measure with the DAX like below:

     

    % = DIVIDE(COUNT('18'[Qty]),CALCULATE(COUNT('18'[Qty]),ALL('18')),0)

     

    Assume the sample data like this:

     

     

    Best Regards,
    Qiuyun Yu

     

     

     

     

  • Thiyags's avatar
    Thiyags
    9 years ago

    Hi,

     

    There is another easy way to do it.  Right click the metric or measure. Click Quik calc. In the dialog box, choose percentage of grand total.