Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

issue with year selection

Hello everyone,

I have an issue as i want to get values such that when i select year the value should get the values from 1-1-of selected year till 3-9-selected year means date of today but year is the selected year . Plz  help it is urgent.

Thanks in advance

Ferha Jafri

1 Solution

Accepted Solutions
Not applicable

Try with:

Start:     =YearStart(min(YourDateField))

End:     =MakeDate(Year(max(YourDateField)), num(Month(Today())), Day(Today()))

Good luck,

View solution in original post

10 Replies
rajeshvaswani77
Specialist III
Specialist III

You can use

yearstart(today()) this will give you 1-1-2013

and today() will give you todays date.

thanks,

Rajesh Vaswani

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Rajesh the issue is that i get the sumof sales suppose from 1-jan-of the selected year till today date of the selected  year as suppose when i select 2010 then the sum of sales i should get is from 1-jan-2010 to 3-sep-2010.

Not applicable

Hi,

  Try with below script in your UI

sum({<Year={$(vMaxYear)},Date={'<=$(vMaxDate)'},Month=>}Value)

Replace your Year/Date field based on your fields name.

-Jay

Not applicable

++ Also make sure to Declare the Variables in your Variable Dec part

-Jay

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

no max of date will get the max date although i want tadays date for the selected year

Not applicable

Try with:

Start:     =YearStart(min(YourDateField))

End:     =MakeDate(Year(max(YourDateField)), num(Month(Today())), Day(Today()))

Good luck,

Gysbert_Wassenaar

Create also a Day field in the script: Day(MyDateFieldHere) as Day. You can then use the Day field in the set analysis expression: sum({<Day={'<=$(=day(today()))'}>}Value)


talk is cheap, supply exceeds demand
Not applicable

Hi,

  Refer the attachment. Let me know if I miss anything

-Jay

er_mohit
Master II
Master II

try this

Create variable

vstartdate is min(Datefield)

venddate is max(Datefield)

sum({$<Datefield={">=$(=vstartdate)<=$(=venddate)"},Year=,Month=>}Sale)