Forum Discussion
Regarding help for power BI DAX
- 9 months ago
Hi Emranit
You can use a measure to virtually summarize a table then multiple virtual capacity column by 2.5, assuming there's only capacity value per day per machine.
Machine Capacity = SUMX ( ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[Date], 'Table'[Machine Name], 'Table'[Capacity] ), "@machine capacity", [Capacity] * 2.5 ), [@machine capacity] )Otherwise you'll need to calculate the max capacity per machine per day virtual before multiplying it by 2.5
Machine Capacity2 = SUMX ( // Iterate over each unique Date–Machine combination ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[Date], 'Table'[Machine Name] ), // Add a computed column for capacity × 2.5 // CALCULATE is needed so MAX('Table'[Capacity]) is evaluated // in the filter context of each Date–Machine row produced by SUMMARIZE. "@machine capacity", CALCULATE( MAX( 'Table'[Capacity] ) ) * 2.5 ), // Sum all values of the computed column [@machine capacity] )
Hi Emranit , to solve the question, you can follow these steps :
Step 1 : Create a custom column
DAX
Daily Machine Capacity =
'Table'[Capacity] * 2.5
Step 2 : Create the measure
DAX
Total Daily Capacity =
SUMX(
SUMMARIZE(
'Table',
'Table'[Date],
'Table'[Machine Name],
"UniqueCap", MAX('Table'[Capacity])
),
[UniqueCap] * 2.5
)
This will compute the Sum for Unique Machine Capacities per Day
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together!🚀 [Explore More]
Not working properly. I have got the solution. Thanks for your nice cooperation.