Skip to main content

Hi,

 

I am trying to use BY LASTNONBLANK function to capture the last non blank value in “A” metric (with dimension Month), and get this value in “B” metric (no dimensions there), so that in B metric I will have only the value from most recent Month.

I used the following formula in metric B:

“Metric A” BY LASTNONBLANK: Month]

The result I am receiving is the sum of all months (the same result I would receive if left “Metric A” in formula without any modifiers).

Do you know how I can retrieve the last nonblank value from the Metric?

Hi Dastan,

I think the best modifier is REMOVE as in “Metric A” REMOVE LASTNONBLANK: Month] .

BY is suited when you’re trying to replace a dimension with another, REMOVE is when you’re removing a dimension from the structure of the block.

Your use of LASTNONBLANK is good though!

François


Hi Francois,

 

Thank you, that worked. I’ve been trying to apply REMOVE, but did it separately. Didn’t think of combining them. Guess learned another new useful thing!


Reply