Tail
-
Thursday, July 05, 2012 3:08 PM
Hi, I have one measure X and date dimension, following is the output if we execute SELECT. If you look into the output, you will find that actual data is present till 06/30/2012 only and for remaining dates data is 0. I want to create a calculated measure in such way that it should return the date 06/30/2012 for which data is present instead of 0.
- Edited by sqldeveloper2008 Thursday, July 05, 2012 3:09 PM
All Replies
-
Thursday, July 05, 2012 3:23 PM
With Member Sales As iif(IsEmpty([Measures].[Reseller Sales Amount]),0,[Measures].[Reseller Sales Amount]) --In my case, there are nulls, hence converting nulls to 0 to simulate your data Select Sales on 0, Tail(Filter([Date].[Date].[Date],Sales>0),1) on 1 from [Adventure Works]
vinu
- Proposed As Answer by Elvis LongMicrosoft Contingent Staff, Moderator Tuesday, July 10, 2012 10:51 AM
- Marked As Answer by Elvis LongMicrosoft Contingent Staff, Moderator Sunday, July 15, 2012 4:37 AM

