Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to limit a KPI object based on a dynamic date, e.g. Revenue CYTD.
I have written the following script (with no error warnings), but I get a boring zero when applying it.
Sum({<[Posting Date]={">=$(=Yearstart(Today())) < $(=today())"} >}[Revenue Amount])
Thanks in advance.
can you check [Posting Date] field date format,it should be DD/MM/YYYY
Hi Nicolai_Mads,
you could add the following to your Load Script to flag the Posting Dates needed:
Your_Table:
Load
*,
If(YearToDate([Posting Date]),1,0) as YTDflag
From...
and then use this in your set expression:
Sum({<YTDflag = {1}>}[Revenue Amount])
Let me know if it helped.
Regards,
Can
The date format is DD-MM-Year. Not sure if that makes any difference?
Hi Canerkan,
Thanks for your reply - I agree that it makes more sense to add to the load script editor instead of using a set analysis in the front-end to avoid having too many expressions decreasing performance.
I did however discover that I could remove the end date (< $(=today())") as I only load realized revenue.