Forum Discussion
cbruhn42
Helper III
3 years agoReturn Last Value for each Attribute by Another Column Value
I have a table of measurements above. I want to return the last measurement Value right before the Tank Conditioned column changes to Yes. The highlighted values of 1008 for ASBC and 3.9 f...
cbruhn42
Helper III
3 years agoOK, I used a combination of solutions here to get it to work half the time.
This works for when there is a production order that goes from Tank Conditioned = No to Yes. However, I can't figure out yet how to return the last values for brands that never go from No to Yes.
HEre is what I have so far.
Last Value =
VAR CurrentOrder = 'BBT Turbidity and Cell Counts'[JFProductionOrder]
VAR CurrentAttribute = 'BBT Turbidity and Cell Counts'[Attribute]
VAR Dt = 'BBT Turbidity and Cell Counts'[Turbidity DT]
RETURN
IF(
'BBT Turbidity and Cell Counts'[Tank Conditioned] = "Yes",
MAXX(FILTER('BBT Turbidity and Cell Counts',
'BBT Turbidity and Cell Counts'[JFProductionOrder] = CurrentOrder &&
'BBT Turbidity and Cell Counts'[Attribute] = CurrentAttribute &&
'BBT Turbidity and Cell Counts'[Tank Conditioned] <> "Yes" &&
'BBT Turbidity and Cell Counts'[Turbidity DT] < Dt
), [Value]),
IF(
'BBT Turbidity and Cell Counts'[Tank Conditioned] = "No",
MAXX(FILTER('BBT Turbidity and Cell Counts',
'BBT Turbidity and Cell Counts'[JFProductionOrder] = CurrentOrder &&
'BBT Turbidity and Cell Counts'[Attribute] = CurrentAttribute &&
'BBT Turbidity and Cell Counts'[Tank Conditioned] <> "Yes" &&
'BBT Turbidity and Cell Counts'[Turbidity DT] < Dt
), [Value]), blank()))