Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
erhang
Helper II
Helper II

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 : 

Capture9.JPG

 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.

 

 

 

 

 

2 ACCEPTED SOLUTIONS
Floriankx
Solution Sage
Solution Sage

Hello,

 

you can try

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

 

Give it a try and let us know.

View solution in original post

Phil_Seamark
Employee
Employee

Hi @erhang

 

Please try this formula

 

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

image.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Phil_Seamark
Employee
Employee

Hi @erhang

 

Please try this formula

 

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

image.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi  @Phil_Seamark 

 

it is working and the formula that i wanted.

 

thanks for your supports and have good day 

 

Erhan 

 

 

Floriankx
Solution Sage
Solution Sage

Hello,

 

you can try

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

 

Give it a try and let us know.

hi @Floriankx ;

 

it is working thank you very much.

 

erhan 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.