Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue on if condition

Hi

Dimension : Type

i have expression like below:

if(BU=' ROLL',(Count({<Type={'App'},DEPT_L3={'Tech Solutions'},

DEPT={' Services',' Information Solutions','Workflow Solutions','Connected Care & Analytics',

'MHS','MTS Services'}, LC_STAGE={'Concept-Opportunity''},STATE={'Active'},WORK={'Application'}>}LC_STAGE)),

if(BU='ROLL',(Count({<Type={'Infrarad'},DEPT={'MTS '},

DEPT={'Services',' Information Solutions','Workflow Solutions','Connected Care & Analytics',

'MHS','MTS  Services'},

LC_STAGE={'Concept-Opportunity'},STATE={'Active'},

WORK={'DCT','Recovery'}>}LC_STAGE)),

when i am applying this expression tp the chart i am getting only one if condition values i.e  Type={'App'} but i am not getting Type={'Infrarad'} these vaules could u please help me out

Note : I need to show both Values i.e  Type={'Infrarad'},Type={'App'}

22 Replies
sunny_talwar

Not 100% sure, but may be this:

If(BU=' ROLL',

RangeSum(Count({<Type = {'App'}, DEPT_L3 = {'Tech Solutions'}, DEPT = {' Services', 'Information Solutions', 'Workflow Solutions', 'Connected Care & Analytics', 'MHS', 'MTS Services'}, LC_STAGE = {'Concept-Opportunity'}, STATE={'Active'}, WORK = {'Application'}>} LC_STAGE),

Count({<Type={'Infrarad'}, DEPT={'MTS '}, DEPT={'Services',' Information Solutions','Workflow Solutions','Connected Care & Analytics','MHS', 'MTS  Services'}, LC_STAGE={'Concept-Opportunity'}, STATE={'Active'}, WORK = {'DCT','Recovery'}>} LC_STAGE)


/


RangeSum(Count(TOTAL {<Type = {'App'}, DEPT_L3 = {'Tech Solutions'}, DEPT = {' Services', 'Information Solutions', 'Workflow Solutions', 'Connected Care & Analytics', 'MHS', 'MTS Services'}, LC_STAGE = {'Concept-Opportunity'}, STATE={'Active'}, WORK = {'Application'}>} LC_STAGE),

Count(TOTAL {<Type={'Infrarad'}, DEPT={'MTS '}, DEPT={'Services',' Information Solutions','Workflow Solutions','Connected Care & Analytics','MHS', 'MTS  Services'}, LC_STAGE={'Concept-Opportunity'}, STATE={'Active'}, WORK = {'DCT','Recovery'}>} LC_STAGE)

)

Not applicable
Author

Hi sunny

i am sharing sample document .please go through it and find the percentage of both the values in chart .

Thanks

sunny_talwar

What is the expectation here? the bars should add up to 100%?

Not applicable
Author

Hi sunny,

Attached is the sample image for previous months we need like this

sunny_talwar

Is this what is required?

Capture.PNG

Not applicable
Author

Yup, that is what we required but here is the issue, We have multiple if conditions in our expression, when we are using the expression what you provided is working fine individually. But the same expression we are using with other if conditions its not working properly..For more detail please see the output in attached image which we are getting.

sunny_talwar

Difficult to know what you need exactly. I really want to help, but I feel I am not fully aware about your data

Not applicable
Author

Hi Sunny First of all thanks for your support

I am providing another sample  qvw file in that we have multiple conditions.

If I am using individually that was working fine but when we are using  with multip[le conditions its not working

For clear idea see attached qvw file

sunny_talwar

I think it would be helpful to know what the numbers need to be.

Not applicable
Author

I am getting correct values for BPS and Canada. I need to get correct values for MTS ROLLUP and the values which you got previously is correct I need to get those values now in mts rollup

Thanks