Forum Discussion

9 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi  JurajSiska

    Maybe something like

    Measure = DIVIDE(SUM(Table1[Budget]), CALCULATE(SUM(Table1[Budget]), ALL(Table1))) 

     

     

    • JurajSiska's avatar
      JurajSiska
      Frequent Visitor

      Hi AlB,

       

      I'm getting an error saying the syntax is incorrect, any idea why? I havent been renaming anything.

       

      Thanks

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AlB ,

       

      I used your formula and it worked like a charm.

       

      do you think there's a way to make the (ALL(Table1)) part filter or axis? 

       

      I used this formula for my Employee engagement survey and i need to filter by question, country, age bracket and department. 

       

      so i need percent of total where total will be all of the above depending on the filter or Axis i set 

       

      Thanks.

      • AlB's avatar
        AlB
        Icon for Community Champion rankCommunity Champion

        Hi Anonymous 

        If you are using for instance country in the axis, something like this should do it 

        Measure = DIVIDE(SUM(Table1[Budget]), CALCULATE(SUM(Table1[Budget]), ALL(Table1[Country]))) 

        Same patter for all the others. You can also, instead of a measure, just place the column Budget in Values of your chart and choose to Show  value as -> Percentage of grand Total

        I would recommend measures in general but if you have too many fields to use in the axis, the latter might be a quicker option

        Please mark the question solved when done and consider giving kudos if posts are helpful.

         Cheers 

         

  • Omega's avatar
    Omega
    Icon for Impactful Individual rankImpactful Individual

    Drag budget again. In the fields pane, click on the arrow next to budget, choose show value as and then choose Percent of Grand total 

     

    • JurajSiska's avatar
      JurajSiska
      Frequent Visitor

      Hi Omega,

       

      this helped for creation of the table, many thanks for that. Is there any way I could use these percentages in other visuals please?

       

      Thanks,

      • Omega's avatar
        Omega
        Icon for Impactful Individual rankImpactful Individual

        You can apply same trick for other visuals :)