Forum Discussion
Calculation DAX
- Anonymous1 year ago
Hi nesrinehal20
Please try the following possible solutions:
1. First, create the following measures to calculate total actual cost and pmp.
TotalActualCost = CALCULATE( SUM('OF'[actual cost]), ALLEXCEPT('OF', 'OF'[num_of]) )TotalPMP = CALCULATE( SUMX( 'OF', RELATED('PURCHASE'[pmp]) ), ALLEXCEPT('OF', 'OF'[num_of]) )2. Create the following measures to calculate consumption and material cost.
consumption = [TotalActualCost] * [TotalPMP]material cost = DIVIDE( [consumption], CALCULATE( SUM('PF'[quantity]), ALLEXCEPT('PF', 'PF'[num_of]) ) )Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Are these CSV files, Excel, PBIX?
You shoudl have all the data (files) in a single PBIX fiel where you can create relationships between the data tables. DAX Measures can then be written to do what you want.
Without the files/data it's hard to give you much more than this so can you please supply samples of these files?
Regards
Phil
i have excel imported in powerbi, realtionship are created. i want to know the dax calculation measure
- PhilipTreacy1 year agoSuper User
- FreemanZ1 year agoSuper User