Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

function in agrr

Hi!

May be anyone know why i can't  use such thing:

Aggr(sum(Quantity_i),AffiliateID, bg_t, Id,left(date_a,6))

exp. i have date_a:

20120101

20120102

20120201

20120305

and i need use Aggr with only month not full date

i try use left(date_a,6) but it is not working

9 Replies
sujeetsingh
Master III
Master III

Hi yes you can not get the month this way.

-First of all tell the date format'dd/mm/yy' or what??

try this----

=right(left(Date#(last_accessed),6),2)

Lets see

Not applicable
Author

hi, sujeetsingh!

field "date_a" in my table is in format - varchar(15)

Not applicable
Author

Hai

pls use conditional dimension for that date_a field

there u need put

left(date(date_a,6))

Not applicable
Author

sorry pls use right(field name ,2)

somenathroy
Creator III
Creator III

Hi,

At script level you may create a field, Left(date_a,6) as month.

Then within expression you may use Aggr(sum(Quantity_i),AffiliateID, bg_t, Id, month)

Regards,

Som

Not applicable
Author

Hai

You mean create new field when i load data with condition?

Not applicable
Author

it is works    thank you

is it not alowed any functions such as left(field,n) inside Aggr function because of Syntaxis?

and any time i have to add new fields with conditions?

somenathroy
Creator III
Creator III

As per my knowledge, Aggr function takes only dimensions not calculated dimesions.

Regards,

Som

Not applicable
Author

thank you !