Forum Discussion

SteelChampzz's avatar
SteelChampzz
Icon for Helper II rankHelper II
3 years ago

DAX Measure for Percentage Calculation with two tables

I have 3 tables:

*Fruit-Ordered*

*Fruit-Sold*

*Fruit+Ordered*

 

I've brought this data in from Excel but I need to be able to create a measure in Power BI to create "Percentage" for the Total & also the "percentage" for the Products as well.

 

"Percentage Total"

 

"Percentage Per Product"

 

I've already have a measure for the total of "Sold+Ordered" but having the issues with using "VAR" or "FILTERS" to create the measures for the "Percentage Total" AND "Percentage Per Product"

 

Happy Friday people and thank you for any help coming my way

 

5 Replies

  • SteelChampzz , you need to create common tables and then analyze the data together

     

    % of the total is usually

     

    Divide(sum(Table[Amount]), calculate(sum(Table[Amount]), allselected()) )

    • SteelChampzz's avatar
      SteelChampzz
      Icon for Helper II rankHelper II

      Could you better explained the "common table"?

      I'm very confused with this part

  • v-yinliw-msft's avatar
    v-yinliw-msft
    Icon for Community Support rankCommunity Support

    Hi SteelChampzz ,

     

    Sorry I have confused what you want, because I can only see two same sample table to explain your question.

    Could you please show me your expect result in Excel by this sample data?

    It is very helpful to solve the problem.

     

    Best Regards,

    Community Support Team _Yinliw

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

    • SteelChampzz's avatar
      SteelChampzz
      Icon for Helper II rankHelper II

      I want to get the "Percentage per Total"

       

       

      As well as "Percentage Per Product"

       

       

      I've circled the DAX measures that I need for both in PowerBI, and I've also have the cell numbers and functions circled that I used in Excel as well to get the percentages from the table.