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

Need help in Expression

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) where ReceptaclesTransactions.ProcedureID=1 and Count(Dispatches.DispatchID)<>0

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

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

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

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.

Kindly find the attachment of qvw file.

so please help me out to solve the issue.

Thanks,

Mukram.

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Maybe:

=Count(aggr(If(Count(Dispatches.DispatchID)=0,Flights.FlightID), Flights.FlightID))

I think, you should use aggr explicitly as you use fields from differnet tables.

View solution in original post

4 Replies
whiteline
Master II
Master II

Closing brackets:

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

Not applicable
Author

Dear,

Thanks for your help three bar expressions are working.

How to write the Expression for Black Exp:

i wrote like this but it's not working

=If(Count(Dispatches.DispatchID)=0,count(Flights.FlightID))

=count(If(Count(Dispatches.DispatchID)=0,Flights.FlightID))

Thanks,

Mukram.

whiteline
Master II
Master II

Maybe:

=Count(aggr(If(Count(Dispatches.DispatchID)=0,Flights.FlightID), Flights.FlightID))

I think, you should use aggr explicitly as you use fields from differnet tables.

Not applicable
Author

Dear Whiteline.

Thank you very much.

now very thing is fixed.

Thanks,

Mukram.