Forum Discussion
BAUTNIDE
2 years agoRegular Visitor
Add calculated row values as a total
Hello dear Power BI community, I have the following problem: I have calculated a number of boxes that need to be refilled for a process if the net required quantity is greater than 0. The calcula...
- 2 years ago
BAUTNIDE , Try updated measure instead of MAX using SUMX
DAX
BedarfKLTs =
SUMX(
'Zusammenführen1',
IFERROR(
IF(
'Zusammenführen1'[Nettobedarf Nachschub] / 'Zusammenführen1'[tbl_PACKSPEC.Menge] <= 0,
0,
ROUNDUP('Zusammenführen1'[Nettobedarf Nachschub] / 'Zusammenführen1'[tbl_PACKSPEC.Menge], 0)
),
0
)
)
BAUTNIDE
2 years agoRegular Visitor
Sorry, but it still doesn't work as intended. 😒 I just can't get it to add up correctly. Currently, the formula that comes closest to the result is as follows:
BedarfKLTs =
IFERROR(
ROUNDUP([Nettobedarf Nachschub] / MAX('Zusammenführen1'[tbl_PACKSPEC.Menge]),0),
0)
The following formula is far from the result:
BedarfKLTB001 =
SUMX(
'Zusammenführen1',
IFERROR(
IF(
DIVIDE([Nettobedarf Nachschub], MAX('Zusammenführen1'[tbl_PACKSPEC.Menge])) <= 0,
0,
ROUNDUP(DIVIDE([Nettobedarf Nachschub], MAX('Zusammenführen1'[tbl_PACKSPEC.Menge])), 0)
),
0
)
)
Here the current situation:
The formula behind "Nettobedarf Nachschub" and "BedarfKLTs" are measures and not part of a table.
Any idea, how I get the correct result?