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: 
Not applicable

Need a help in set analysis

Dear All.

i want to create a bar chart which shows 4 bars without dimension.

four bars as follows Green , Red ,Black ,Yellow.

expressions:

1) expression for Green Bar----> count(Flights.FlightID) when ReceptaclesTransactions.ProcedureID=1 and Count(Dispatches.DispatchID)<>0

2) expression for Red Bar----> count(Flights.FlightID) when ReceptaclesTransactions.ProcedureID<>1 and Count(Dispatches.DispatchID)<>0

3) expression for Black Bar----> count(Flights.FlightID) when Count(Dispatches.DispatchID)<>0

4) expression for Yellow Bar----> count(Flights.FlightID).

i tried by using if condition but it's not working fine.

and i also tried by creating a variable  vCount_DispatchID=count(Dispatches.DispatchID)

like in set anlaysis for 1 expression

=Count({<ReceptaclesTransactions.ProcedureID={1} , vCount_DispatchID-={0} >} Flights.FlightID)

so please help me out to solve the issue.

Thanks,

Mukram.

1 Solution

Accepted Solutions
sebastiandperei
Specialist
Specialist

1) Count({<ReceptaclesTransactions.ProcedureID={"1"}>} If (Count(Dispatches.DispatchID)<>0, Flights.FlightID))

2) Count({<ReceptaclesTransactions.ProcedureID={"1"}>} Flights.FlightID)

3) Count( Flights.FlightID )

If You want to use "full" Set Analysis expression, you could try this:

1) Count({<ReceptaclesTransactions.ProcedureID={"1"}, Flights.FlightID={"=Count(Dispatches.DispatchID)<>0"}>} Flights.FlightID)

View solution in original post

6 Replies
Not applicable
Author

what do you use a set analysis?  Why do you calculate from script four expression whit a group by? if you calcoleted from script le performance is best than calculated from tab .

sebastiandperei
Specialist
Specialist

1) Count({<ReceptaclesTransactions.ProcedureID={"1"}>} If (Count(Dispatches.DispatchID)<>0, Flights.FlightID))

2) Count({<ReceptaclesTransactions.ProcedureID={"1"}>} Flights.FlightID)

3) Count( Flights.FlightID )

If You want to use "full" Set Analysis expression, you could try this:

1) Count({<ReceptaclesTransactions.ProcedureID={"1"}, Flights.FlightID={"=Count(Dispatches.DispatchID)<>0"}>} Flights.FlightID)

Not applicable
Author

Dear Sebastian Pereira

Thanks for your reply.

i tried your solution but it's not working.

export.png

this is some part of the my data model. which i am using in the following scenario.

so i need a barchart which show four bars as i discussed in previous reply..

Like RED ,BLACK ,GREEN and ALL.

if any body need any more details then let me know.

so please some one help me out.

Thanks,

Mukram

sebastiandperei
Specialist
Specialist

Hi Mukam,

Could you please send a copy? reduced at least...

Not applicable
Author

Dear,

Bar chart :

i tired the following expression but it's not giving proper solution

1)For RED Bar Expression:

=Count({<ReceptacleTransactions.ProcedureID -={"1"}, Flights.FlightID={"=Count(Dispatches.DispatchID<>0"}>}Flights.FlightID)

For Black:

  =count(If(vCount_DisptachID=0,(Flights.FlightID)))

For GREEN Exp:

=Count({<ReceptacleTransactions.ProcedureID={"1"},Flights.FlightID={"=Count(Dispatches.DispatchID<>0"}>}Flights.FlightID)

For ALL Exp:

==count(Flights.FlightID)

so some one please help me to fix the issue.

Not applicable
Author

Dear Community.

kindly somebody help me to solve the above Issue.

Thanks,

Mukram.