LastEverNonEmpty

m1nkeh

New Member
Joined
Jul 28, 2014
Messages
30
hi,

i've a model where i need to know at a given point in time what the value of a sales pipeline is by order and the latest status of the product...

so, upon creating a simple model.. i am geting as fast as being able to implement a LastNonEmpty style calculation.. but then not getting anywhere, the best code i've got so far is:

Code:
z :=CALCULATE (
    SUM ( 'Data'[Value] ),
    FILTER (
        'Data',
        'Data'[StateChangeId]
            = CALCULATE (
                MAX ( Data[StateChangeId] ),
                ALL ( Data ),
                'Data'[Product] = EARLIER ( 'Data'[Product] ),
                'Data'[Date] <= VALUES ( 'Date'[Date] )
            )
    ),
    LASTDATE ( 'Date'[Date] )
)

after staring at various blogs from Marco and Alberto for far too long!

I don't understand why i'm getting an error message regarding "a table of multiple values was supplied"

Can provide the workbook if required...

Thanks!
 
k, here is a link to the workbook: http://1drv.ms/1o1N7DD

we've put a wrapper around the LastNonEmpty value to do a SUMX over the product dimension... it works, but feels a bit wrong because what happens when you stick another dimension on?!

It might be the best option... but it does feel a bit 'wrong'

9lKdaSz.png
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,027
Messages
6,175,992
Members
452,694
Latest member
SaruwatariKaito

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top