Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
etrotter
Creator II
Creator II

Last day of the Month Set analysis

Hello,

I am trying to write a formula that will show me the last day of the month data, here is what I currently have:

{<Date ={"$(MonthStart(Min(Date))-1)"}>}

Please let me know what I should be doing differently for it to recognize it

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Oh so you are looking to get month end value for each month on a line graph? Why not create a flag for this in the script

LOAD Date = Floor(MonthEnd(Date)) as Flag

and then this

Avg({<Flag = {'-1'}>}Goal)

View solution in original post

18 Replies
sunny_talwar

Try this

{<Date = {"$(=MonthStart(Min(Date))-1)"}>}

or this

{<Date = {"$(=Date(MonthStart(Min(Date))-1))"}>}

etrotter
Creator II
Creator II
Author

Neither of those are working

sunny_talwar

What is your date field format?

etrotter
Creator II
Creator II
Author

M/DD/YYYY ex: 9/20/2017

sunny_talwar

How about this

Sum({<Date = {"$(=Date(MonthStart(Min(Date))-1, 'M/D/YYYY'))"}>} Measure)

etrotter
Creator II
Creator II
Author

Avg({<Date = {"$(=Date(MonthStart(Min(Date))-1, 'M/D/YYYY'))"}>} Goal)

its still not working, im using average, could this effect output?

sunny_talwar

It should not... can you share an image of the table where you add this as measure and hover over the expression header to show what the expression looks like? Make sure to now use any expression labels

etrotter
Creator II
Creator II
Author

Capture3.PNG

the expression is: Avg({<Date = {"$(=Date(MonthStart(Min(Date))-1, 'MM/D/YYYY'))"}>} Goal)

pradosh_thakur
Master II
Master II

hi

do you have month or date or year any date related field as dimension ?

Learning never stops.