Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
idodel
Contributor III
Contributor III

OR Mode in Set Analysis

Hello! I have a bit problem with set analysis.

I need the measure to count the expression if one of the 2 fields "INCOME_PRICE" , "PRECENT_INCOME_PROJ" is greater than 0. (besides of all the other filters..)

and as I know, set analysis is like AND mode and not like OR mode.

or mode set analysis.PNG

how can I do that?

Thanks for all

Labels (2)
6 Replies
Saravanan_Desingh

May be.

Count(DISTINCT {<FieldA={"=NCOME_PRICE > 0 Or PRECENT_INCOME_PROJ > 0"}>} FieldA)
skamath1
Creator III
Creator III

Try something like 

Count(DISTINCT {   ( <INCOME_PRICE = {">0"}> + < PRECENT_INCOME_PROJ = {">0" }>   )  } FieldA)

 

I have an expression in my data set that works. For me, I need to count records where Status2 = 1 or Status3 = 1.

Status2 and Status3 have data values of  0 and 1. 

Count( { ( <Status2={1}> + <Status3={1}> ) } ID)

 

sergio0592
Specialist III
Specialist III

Hi, try with :

Count(DISTINCT {<INCOME_PRICE = {">0"}> + <PRECENT_INCOME_PROJ = {">0" }>} FieldA)
idodel
Contributor III
Contributor III
Author

Hey! thank you all for helping me.

At first I thought it solved the problem (when I filter on 1 project I saw 100%)

but then I cancel the filter and I saw over than 100% have the [INCOME_PRICE] OR [PRENECT_INCOME+PROJ] >0 , which is not possible.

 

idodel
Contributor III
Contributor III
Author

I have tried to put in the measure:

if(  [INCOME_PRICE] > 0 OR [PRENECT_INCOME_PROJ]  > 0,

SOME SET ANALYSIS- WITHOUT THE PRICE FIELDS,

0)

-when I do this all the projects are 0 from some reason.

what can I do ?

Brett_Bleess
Former Employee
Former Employee

You likely need to attach a sample QVW in this case in order to receive the help you need, as folks need to be able to see the data model and expressions in some cases in order to see what may be going wrong.

The only other place I can point you is to the Design Blog area:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

The Help may be good to review too:

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.