Forum Discussion
Measure only showing values when column equals a dedicated text
jmpmolegraaf , Try using
This measure will only return a value when CostCategory is "ADD".
DAX
UMlnbv =
IF(
NOT ISBLANK([CVlnbv]) && MAX(PurchasePrices[CostCategory]) = "ADD",
CALCULATE(
LASTNONBLANKVALUE(
UpstreamMargins[Attribute],
SUM(UpstreamMargins[Value])
),
_Calendar[Date] <= MAX(_Calendar[Date])
CV-UM: This measure will only deduct by the UMlnbv when CostCategory is "ADD".
DAX
CV-UM =
IF(
MAX(PurchasePrices[CostCategory]) = "ADD",
[CVlnbv] - [UMlnbv],
[CVlnbv]
)
These modifications ensure that the UMlnbv measure only shows values when the CostCategory is "ADD" and that the CV-UM measure only performs the deduction when the CostCategory is "ADD"
dear bhanu,
yes i tried that before, see below the effect of the "TEST" measure you gave.
basically it does not generate "lastnonblankvalues", i.e. it does not fill down the value anymore.
it only shows a value where there is actually a value on the exact date, in the table PurchasePrices.
for the subsequent dates, there is no entry in PurchasePrices but still need to see the value.