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: 
upaliwije
Creator II
Creator II

SET EXPRESSION

Hi

if((sum({<MO_NM={'MOTOR'}>}[PREMIUM])

/sum({<MO_NM={'MOTOR'}>}[R_BUDGET])*100>=100

AND

(sum({<MO_NM={'NON_MOTOR'}>}[PREMIUM])

/(sum({<MO_NM={'NON_MOTOR'}>}[R_BUDGET]))))*100>=100,

sum([PREMIUM]))

I have above expression which does not work. Pls help me to correct it

I want both Motor and Non Motor  to be >= 100% and then sum the Premium

10 Replies
tresesco
MVP
MVP

May be few bracket corrections would help, like:

if((sum({<MO_NM={'MOTOR'}>}[PREMIUM])

/sum({<MO_NM={'MOTOR'}>}[R_BUDGET])*100)>=100

AND

(sum({<MO_NM={'NON_MOTOR'}>}[PREMIUM])

/sum({<MO_NM={'NON_MOTOR'}>}[R_BUDGET])*100)>=100,

sum([PREMIUM]))

Note : removed few brackets as well.

upaliwije
Creator II
Creator II
Author

Expression shows Ok message . But Results are not shown

tresesco
MVP
MVP

Could you post your representative sample qvw?

upaliwije
Creator II
Creator II
Author

I attach h/w my document. Pls help

tresesco
MVP
MVP

In data you have 'NOM_MOTOR' rather than 'NON_MOTOR'.

rido1421
Creator III
Creator III

Hi Upali

Actual:

if((sum({<MONM={'MOTOR'}>}[PREMIUM])

/sum({<MONM={'MOTOR'}>}[BUDGET])*100)>=100

AND

(sum({<MONM={'NOM_MOTOR'}>}[PREMIUM])

/sum({<MONM={'NOM_MOTOR'}>}[BUDGET])*100)>=100,

sum([PREMIUM]))

Budget:

if((sum({<MONM={'MOTOR'}>}[PREMIUM])

/sum({<MONM={'MOTOR'}>}[BUDGET])*100)>=100

AND

(sum({<MONM={'NOM_MOTOR'}>}[PREMIUM])

/sum({<MONM={'NOM_MOTOR'}>}[BUDGET])*100)>=100,

sum([BUDGET]))

You should also remove MONM as a Dimension as it will make the chart disappear when you expand it.

Maybe change to a straight table instead of Pivot?

upaliwije
Creator II
Creator II
Author

Thank for hilighting. Even if it is corrected the resul is not shown.

rido1421
Creator III
Creator III

Please have a look at this

upaliwije
Creator II
Creator II
Author

Thanks

I want to to MONM also to appear in the chart