Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys
i have a requirement for my project ,i got a fromdate and a todate drop down boxs i just mention only few dates but normally i got more
so now the requirement is when user select a fromdate and a todate then it need to display sum of those dates lotsinspected.....?
for example if he select Fromdate=1/01/2015 Todate=30/01/2015(
then answer as to be(trying to display in pivot table)
category ( subcategory) lotsinspected
mining + 30
smelting + 10
Fromdate Todate category sub category lotsinspected lots accepted lotsrejected
1/01/2015 30/01/2015 mining a 10 8 2
1/01/2015 30/01/2015 mining b 10 8 2
1/01/2015 30/01/2015 mining c 10 8 2
1/02/2015 28/02/2015 mining a 5 2 3
1/02/2015 28/02/2015 mining b 15 12 3
1/02/2015 28/02/2015 mining c 20 15 5
1/01/2015 30/01/2015 smelting a 10 8 2
according to me the expression gets in to my mind is this:
sum(category={'mining','smelting'},sub category={'a','b','c'}, date=sum({<date={">=$(=max(Fromdate))<=$(=max(Todate))"}>}lotsinspected)
but the thing is i havent got any particular date field at my script level i just got fromdate field and todate field
so how to get date field which represent fromdate and todate.....
please if there is any other way to solve my above requirement .i wish if i could have provide you guys proper date but fortunately client wont let me do that
thanks
naveen
hi Naven,
Can you post example of your data?
Thanks
Hi,
If you are using Calendar object, you can give your Date Field. Here From Date and To Date..
You don't want to include this date into your Set Expression. Just try this expression
=sum({<category={'mining','smelting'}, [sub category]={'a','b','c'}>}lotsinspected)
Sample attached
Hello Settu,
Thanks for a very quick response,I am really sorry for not understanding ur technical view....
If you are using Calendar object, you can give your Date Field. Here From Date and To Date..
so u mean that even thought if i havent mention the From Date and To Date in the expression will it still display the value in b/w that range which user selected from drop down......by the way i got only those two fields in my table box ..no master calendar table box.
thanks
K.Naveen
i think, i misunderstood your requirement. if you give some more sample date, it would be help to provide the suggestion..
May be you can create two variable for From date and To date and use it in your expression..
like
=sum({<category={'mining','smelting'},
[sub category]={'a','b','c'},Fromdate={'>=$(=Date($(vFrom)))'},Todate={'>=$(=Date($(vFrom)))<=$(=Date($(vTo)))'}>}lotsinspected)
Check the Attachment. May be helps..
Hello Settu ,
I think this expression should work because my concern way how to frame this two fields in to one
as i dont have any date kind of field...i hope this should work now
so my variable will be these
set vFrom=From date;
set vTo=To date;
if it work i will mark as helpfull and finishes the thread ,...
thank
naveen
create two variables and set the min and max value based on the From and To date filed...
check my attachment and see the properties of calendar object
Hi ,
Check this,
PFA,
HirisH