Forum Discussion

erhang's avatar
erhang
Helper II
8 years ago
Solved

DAX Formula Help (percentage calculating)

Hi dear Power Family ;

 

İ need your help about calculating a below situation .Thanks in advance for your supports and have a nice day.

 

i have below table : 

 As you see on above table i have some projects that are including different materials with order quantities and stock quantities.

 

İ would like to show that : 

 

  • For Project1 , many different materials has been ordered 70  pcs in  totaly.But these material's  stock quantity is 60 pcs in totaly.So i can supply  %85 of Project1's materials
  • as project1's calculation i can supply  %87 of Project2's materials

i want to show these percentages with an infocard on the report.When i filter project1 , the card will show %85 and when i filter the project2 , the card will show %87 .

 

So could pls  you help me about the  formula how can i calculate .

 

thaks for your supports dear friends.

 

 

 

 

 

  • Hello,

     

    you can try

    Availability=DIVIDE(SUM([Stock Quantity]),SUM([Order Quantity]))

     

    Give it a try and let us know.

  • Hi erhang

     

    Please try this formula

     

    Measure = DIVIDE( SUM(Table1[Stock Quantity]) ,  SUM([Order Quantity]))

4 Replies

  • Hello,

     

    you can try

    Availability=DIVIDE(SUM([Stock Quantity]),SUM([Order Quantity]))

     

    Give it a try and let us know.

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi erhang

     

    Please try this formula

     

    Measure = DIVIDE( SUM(Table1[Stock Quantity]) ,  SUM([Order Quantity]))

    • erhang's avatar
      erhang
      Helper II

      Hi  Phil_Seamark 

       

      it is working and the formula that i wanted.

       

      thanks for your supports and have good day 

       

      Erhan