Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

max value display

Hello all,

sample data

Untitled.png

when i select max date i was suppose to get 500 as value but i am getting 0

Untitled.png

Varibles:

vMindate = 3sep;

vMaxdate = Date;

expression:=sum({<Date={"$(vMindate)"}>}value)  = 100

                   sum({<Date={"$(vMaxdate)"}>}value) =500 (Not Working)

wats going wrong in my above statement?

thanks

18 Replies
tamilarasu
Champion
Champion

I have attached a sample in my previous reply.

settu_periasamy
Master III
Master III

Hi Naveen,

you need to change the variable vMaxdate as =Date

or you can use the expression like

=sum({<Date={"$(=$(vMaxdate))"}>}value)


note: It seems, your Date field is not properly formatted. Max(Date) won't work for you, it will give the max string.

kunkumnaveen
Specialist
Specialist
Author

Hi

thanks for ur help..its working

i am trying to display SUM b/w min value and max value(selected from calendar box)

let say if i select 5sep from Calendar box

sum has to be from  (100+200+300)

if i select 6sep =(100+200+300+500)

something is missing from my expression :

=sum({<Date={">=$(vMindate)<=$(vMaxdate)"}>} value)

kunkumnaveen
Specialist
Specialist
Author

Hello settu,

i am trying to display SUM b/w min value and max value(selected from calendar box)

let say if i select 5sep from Calendar box

sum has to be from  (100+200+300)

if i select 6sep =(100+200+300+500)

something is missing from my expression :

=sum({<Date={">=$(vMindate)<=$(vMaxdate)"}>} value)

tamilarasu
Champion
Champion

Naveen,

Have a look at the attachment.

kunkumnaveen
Specialist
Specialist
Author

yes both requirement look similar  but only the problem is over here i want to add extra one thing i mean

Group1(comparative analysis)

Varible:

vMindate=3sep (remain same)

vMaxdate=only({group1}date).....(need help over here)

expression :

=sum({group1<Date={">=$(vMindate)<=$(vMaxdate)"}>}value)

kunkumnaveen
Specialist
Specialist
Author

yes both requirement look similar  but only the problem is over here i want to add extra one thing i mean

Group1(comparative analysis)

Varible:

vMindate=3sep (remain same)

vMaxdate=only({group1}date).....(need help over here)

expression :

=sum({group1<Date={">=$(vMindate)<=$(vMaxdate)"}>}value)

kunkumnaveen
Specialist
Specialist
Author

Hi,

sorry for annoying you man ..can i ask you one thing ,is it necessary to do this at script level

Load Date(Date#(Date,'DMMM'),'DMMM') as Date, value;

because i tried by commenting this ,then it was not working.....

vMaxdate  =Date(Max({group1}Date),'DMMM')

is there any other way instead of writing this at script level (as i got 12tabs and i have no clue from which tab the date is popping up)

tamilarasu
Champion
Champion

No Problem Naveen. You need to interpret the date field in script level else the field will be considered as text field. So you can not perform calculation between the dates (on the text field).