Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr in expression HELP

Hi,

I have written a expression, it works when i select 1 month, but when i try to see several months in my table, the numbers go crazy.

Expression:

Sum(Total{<KONTRGRNR={5},SALKONT={3075,3097,3098,3099},LINJETEKST={'Elsert*', 'Påslag*'}>}SUM*'0,8')

*

((sum({<SALKONT={3091}>}AVRMENGDE) - Sum({<SALKONT={3098,3099},KONTRGRNR-={5}>}AVRMENGDE))

/

(sum(TOTAL{<SALKONT={3091}>}AVRMENGDE) - Sum(TOTAL{<SALKONT={3098,3099},KONTRGRNR-={5}>}AVRMENGDE))

)

Dimmensions:

%key

KONTGRNAMN

PRICEAREAID

Month

Year

selected Jan, Feb, Mar;

selected Jan, Feb;

4 Replies
sunny_talwar

May be you need to use field name with TOTAL qualifier here?

Sum(Total <Month> {<KONTRGRNR={5},SALKONT={3075,3097,3098,3099},LINJETEKST={'Elsert*', 'Påslag*'}>}SUM*'0,8')

*

((sum({<SALKONT={3091}>}AVRMENGDE) - Sum({<SALKONT={3098,3099},KONTRGRNR-={5}>}AVRMENGDE))

/

(sum(TOTAL <Month> {<SALKONT={3091}>}AVRMENGDE) - Sum(TOTAL <Month> {<SALKONT={3098,3099},KONTRGRNR-={5}>}AVRMENGDE))

)

Anonymous
Not applicable
Author

Hi, thanks for reply

I have now tried with <Month> but then all the collums become 0.

Any other suggestions?

Anonymous
Not applicable
Author

Thanks, i also wrapped the expression in aggr. Then it worked, thanks so much !

sunny_talwar

This might be a stupid question, but did you use the word Month or  Maned? You have to use the month field name that is in your dashboard... I hope you used Maned as it appears that is the name of your month field