DAX last date Prior to a specific date

shophoney

Board Regular
Joined
Jun 16, 2014
Messages
218
Hi I'm trying to figure out what the last discount was on a Prior date.

I have the following:

tblInvPriceDisc that has a list of all the dates and discounts for all sku's
tblInvSkuMaster that has a list of all sku's in the company
ConfigurationTable that has the date i'm looking up.

I would like to know the discount that was Prior to the "PRIORDATE"

This is what I have so far but it doesn't work as a measure or calculated column.

=CALCULATE(MAX(tblInvPriceDisc[start_active_dt]),
FILTER(tblInvPriceDisc,
tblInvPriceDisc[start_active_dt]<=ConfigurationTable[Prior Date] ))

Thanks
 

Forum statistics

Threads
1,085,419
Messages
5,383,557
Members
401,836
Latest member
Bweston07

Some videos you may like

This Week's Hot Topics

Top