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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

Hi all,

In the pie chart I need to exclude the data of batch_meta_data_id = {1,4,5} and I want to select the data of only, final_test_status = {'passed'} ,version={'v1'}.

Is the below expression is correct? If not please help with the correct one.

SUM({$-1<batch_meta_data_id = {1, 4, 5},final_test_status = {'passed'},version={'v1'}>}browser_visits)

Thanks,

Pramod

13 Replies
sunny_talwar
MVP
MVP

Try this:

=Sum({$<batch_meta_data_id -= {1, 4, 5}, final_test_status = {'passed'}, version={'v1'}>}browser_visits)

Update: Explanation

Exclude batch_meta_data_id 1, 4, 5 -> batch_meta_data_id -= {1, 4, 5} //with a negative before equal sign

Only passed final_test_status and v1 version -> final_test_status = {'passed'}, version={'v1'}

HTH

Best,

Sunny

Not applicable
Author

No values are changing. it remains same.

$ will select the data right, but i want to exclude the {1,4,5} and select other batches data.

Not applicable
Author

Hi,

$-1 is used to get previous selection data

Use this

SUM({$<batch_meta_data_id -= {1, 4, 5},final_test_status = {'passed'},version={'v1'}>}browser_visits)

sunny_talwar
MVP
MVP

Hey Pramod

I am not sure I understand what you mean??? The expression I gave you will work the following way:

With no selections made it will show all batch_meta_data_id except 1,4 and 5 and final_test_status passed and version v1. If you make a selection in final_test_status or version, it won't have impact on your expression's output, but batch_meta_data_id selection will reduce your output to those ids which are selected (still excluding 1, 4 and 5) and any other selection will also filter the expression (because of $). If you don't want your expression to impacted with any selection then you can use 1 instead of $ (although it will still filter down on selection in batch_meta_data_id)

I hope this helps.

Best,

Sunny

Not applicable
Author

Hi sunny,

I am attaching the .qvf file.

In Os and browser sheet, i am using the 2 pie charts to display the browser stats of the batches.

I am using 3 KPI's.

KPI 1 has 16,287.

KPI 2 has 1,040

KPI 3 has 16,247

I need to display the browser stats for the version 1 and 2 in two different pie charts.

I am having counts problem.

KPI 3 + KPI 2 =KPI 1

I am not getting where i am going wrong.

Please check it and help.

Regards,

Pramod

prabhu0505
Specialist
Specialist

V1 and V2 overlaps each other, take a look on attachment hope it will be useful.

abhaysingh
Specialist II
Specialist II

try this

SUM({<batch_meta_data_id -= {'1', '4', '5'},final_test_status = {'passed'},version={'v1'}>}browser_visits)

and let me know

Not applicable
Author

Hi Saravana,

Thanks for the help.

The counts are now matching.

Why the line " the data contains negative or zero values that cannot be shown on this." is displaying.

How can i hide this line.

browser.png

Regards,

Pramod

jonathandienst
Partner - Champion III
Partner - Champion III

A pie chart cannot meaningfully display data that contains a mix of positive and negative numbers. You can suppress the negative numbers or take absolute values, but that may distort the data in a way that will be hard for users interpret. A better visualisation for such data is a bar chart.

To suppress negatives:

     Sum(RangeMax(Sales, 0))

To absolute values (most definitely NOT recommended)

     Sum(Fabs(Sales)) or Fabs(Sum(Sales))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein