Skip to Content
0
Former Member
May 12, 2015 at 05:19 PM

MTD Caculation Problem

46 Views

My requirement is to sow the measure value for MTD.

For example if user selects a Date 20/01/2014 i need to sow the measure value from 01/01/2014 to 20/01/2014.

I am trying to calculate MTD for my measure using below formula

SUM

(

CASE WHEN (SomeTable.Fact_Date) between TRUNC (@prompt(Date) , 'mm') and @prompt(Date)

THEN FactTable.Measure

END

)

am writing this formula in select clause of measure object in IDT.

but its throwing below error.

[Microsoft SQL Server Native Client 10.0] : 'TRUNC' is not a recognized built-in function name.

Can anyone pls help me how to achieve MTD calculation in detail.

thanks

Praveen