Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Creating Calculate Percentage column

Hi,

 

I want to be able to create a column which calcluates the percentage using 2 exisiting columns: Brand Opt-in / Total Entries * 100.  I have tried several DAX formulas but have failed to shape it in the right syntax.

 

 

Any help would be appreciated

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous,

     

    you can try 

    Percentage = CALCULATE(SUM(Table[Brand Opt-in]))/CALCULATE(SUM(Table1[Total Entries]))*100.
    You create a calculated measure instead of column.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    you can try 

    Percentage = CALCULATE(SUM(Table[Brand Opt-in]))/CALCULATE(SUM(Table1[Total Entries]))*100.
    You create a calculated measure instead of column.
  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi Anonymous ,

     

    Please make sure you’ve enabled the % formatting for the column as below.

    Here I’m suing DIVIDE function instead of “/” in case of infinity appears.

    DIVIDE(numerator,denominator,0),

     

    Column = DIVIDE([Diff Pop],Table1[Total population],0)