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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
DimaMD
Solution Sage
Solution Sage

Percentage of products from materials

Hello community.

 

I need to make some interesting calculations

 

We have a table which consists of ready products and materials.

 

The goal is to calculate percentage of ready products that contains in materials. For that reason we need to calculate total ammount of materials. Then we need to divide every amount of ready product with total ammount of materials so we could get percentage that has this ready product in materials.

 

With what mesure can I achive that?

 

 Example pbix


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@DimaMD  change to following

 

Material = CALCULATE( SUM('Table'[Amount]), 'Table'[View]="Material",REMOVEFILTERS('Table'[Product],'Table'[Amount]))

RedyProdyct = CALCULATE( SUM('Table'[Amount]),'Table'[View] = "RedyProduct" )

% material = DIVIDE(
    [RedyProdyct],[Material])

 

gives you this

 

smpa01_0-1641324424068.png

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@DimaMD  change to following

 

Material = CALCULATE( SUM('Table'[Amount]), 'Table'[View]="Material",REMOVEFILTERS('Table'[Product],'Table'[Amount]))

RedyProdyct = CALCULATE( SUM('Table'[Amount]),'Table'[View] = "RedyProduct" )

% material = DIVIDE(
    [RedyProdyct],[Material])

 

gives you this

 

smpa01_0-1641324424068.png

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@smpa01 Hi,
Thank you for helping to understand how to calculate, I am very grateful to you.
The measures worked


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Greg_Deckler
Super User
Super User

@DimaMD In looking at the PBIX file, I am not sure how to identify which ready products have which materials in them. Or is that not important?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors