Forum Discussion
selpaqm
Helper V
6 years agoUse EARLIER with if
Hi, i have a table like below. ID Name1 Name2 Total shipped true/false Ordertype 8 A X 1000 300 TRUE W 15 A X 1200 FALSE C 7 C X 500 TRUE X 16 K X ...
- 6 years ago
You could consider this approach:
Total Cost Based Total =
VAR adjcosttotal = (your current expression)
VAR Falserows =
CALCULATE (
COUNTROWS ( Sheet1 ),
ALL(Sheet1), Sheet1[Name]=EARLIER(Sheet1[Name]),
Sheet1[true/false] = FALSE ()
)
RETURN
IF ( Falserows > 0, 0, adjcosttotal )
mahoneypat
Microsoft Employee
6 years agoYou could consider this approach:
Total Cost Based Total =
VAR adjcosttotal = (your current expression)
VAR Falserows =
CALCULATE (
COUNTROWS ( Sheet1 ),
ALL(Sheet1), Sheet1[Name]=EARLIER(Sheet1[Name]),
Sheet1[true/false] = FALSE ()
)
RETURN
IF ( Falserows > 0, 0, adjcosttotal )
selpaqm
Helper V
6 years agoworks fine,
thanks mahoneypat