Forum Discussion
jmpmolegraaf
1 year agoFrequent Visitor
conditional lastnonblank
Hello all, I have below measure / visual table: I only want to show values when CostCategory = "ADD" the filling down by lastnonblank needs to keep on working (obviously). no matter where I tr...
- Anonymous1 year ago
Hi jmpmolegraaf , hello rajendraongole1, thank you for your prompt reply!
Try the following measure:
lastnonblank = IF( MAX(UpstreamMargins[CostCategory]) = "Add", CALCULATE( LASTNONBLANK( UpstreamMargins[AppDate], SUM(UpstreamMargins[UM (USD/HL)]) ), _Calendar[Date] <= MAX(_Calendar[Date]) ), "")Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1 year agoNot applicable
Hi jmpmolegraaf , hello rajendraongole1, thank you for your prompt reply!
Try the following measure:
lastnonblank =
IF(
MAX(UpstreamMargins[CostCategory]) = "Add",
CALCULATE(
LASTNONBLANK(
UpstreamMargins[AppDate],
SUM(UpstreamMargins[UM (USD/HL)])
),
_Calendar[Date] <= MAX(_Calendar[Date])
),
"")
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.