Hi All, I’m looking for a measure that will return last year’s data only if the selected year value is >0. In the example below, I want to add a measure that will get last year’s data if CompUSDSalesAmount is > 0.
Here is an example .pbix. Conditional Last Year.pbix (1.2 MB)
Thanks for your help. DJ
Hi @DeanJ,
Give this a go.
LY Sales simple = IF( [Total Sales USD] <>0, [Total Sales USD LY] )
or
LY Sales incl. total = VAR DateList = FILTER( ALLSELECTED( Dates ), [Total Sales USD] <>0 ) RETURN IF( ISINSCOPE( Dates[Date] ), IF( [Total Sales USD] <>0, [Total Sales USD LY]), SUMX( DateList, [Total Sales USD LY] ) )
I hope this is helpful
Thanks @Melissa !!