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...
Anonymous
3 years agoNot applicable
Hi cbruhn42 ,
Please crate a calculate column like:
Last Value =
VAR CurrentOrder = 'Table'[JFProductionOrder]
VAR CurrentAttribute = 'Table'[Attribute]
VAR Dt = 'Table'[Turbidity DT]
RETURN
IF(
'Table'[Tank Conditioned] = "No",
CALCULATE(
LASTNONBLANK('Table'[Value],1),
FILTER(
ALL('Table'),
'Table'[JFProductionOrder] = CurrentOrder &&
'Table'[Attribute] = CurrentAttribute &&
'Table'[Turbidity DT] < Dt &&
'Table'[Tank Conditioned] <> "Yes"
)
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
cbruhn42
Helper III
3 years agoThis doesn't quiet work. If I only have one measurement set with before the tank is conditioned I get blank values.
If I have a brand that never switches to Tank Conditioned = Yes, then I get the incorrect values.
WE're close though! Thank you for the help.