2 Replies Latest reply: Sep 23, 2017 6:42 AM by Maria Poulsen RSS

    Show percentage in pivot table

    Maria Poulsen

      Hi all

       

      I want to do a pivot table with two dimension: year and age.

      I want to show the percentage of people in a certain age-group within every year for the people in my population with foreign nationality, like this:

      pivot.png

      I know how to calculate the number of people within each group using the function

       

           =count( {< [Nationality]={'Udenlandsk'} >} Person_id)

       

      But how do I get QV to show the percentage in stead, like in the example above?

       

      I already tried:

       

           = count( {< [Nationality]={'Udenlandsk'} >} Person_id) /     count(total  {< [Nationality]={'Udenlandsk'} >} Person_id)

       

      But this doesn't give the percentage I want.

       

      Kind Regards

      Maria