Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Honored Contributor II

Re: Need help in Expression

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.

4 Replies
whiteline
Honored Contributor II

Re: Need help in Expression

Closing brackets:

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

Not applicable

Re: Need help in Expression

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
Honored Contributor II

Re: Need help in Expression

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

Re: Need help in Expression

Dear Whiteline.

Thank you very much.

now very thing is fixed.

Thanks,

Mukram.

Community Browser