Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

counting expressions

Hi i would like to be able to create a stack chart out of an expression column which shows values -1 and 0. (see screenshot)

-1 = red & 1 = green

is it possible to count these expressions to receive an amount for both values and represent them in a piechart?

the actual values represent SLA Level measurements if a a case has met the time requirements or not.

a picture reference is attached to this post.

//Best

Bradley

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Ok, I see 😃

It's a bit monstrous, cause you have a rather complex expression:

=Count({<Ärende_ID={"=((NetWorkDays(Created,[Updated])- IF(Frac([Updated]) < Time#('17:00','hh:mm'),1,0)-IF(Frac([Updated]) >  Time#('17:00','hh:mm'),1,0)- IF(Frac(Created) > Time#('08:00','hh:mm'),1,0) - IF(Frac(Created) < Time#('08:00','hh:mm'),1,0))*8+ RangeMax(((Time#('17:00','hh:mm') - Frac(Created))*24),0)+ RangeMax(((Frac([Updated]) - Time#('09:00','hh:mm'))*24),0)) > SLAend"}>} Ärende_ID)

I think you could consider to make some calculations in script to simplify it.

And just to get better understanding what it is doing (this one is not working but looks much easier):

=Count({<Ärende_ID={"=[Total Hours]>SLAend"}>} Ärende_ID)

View solution in original post

10 Replies
whiteline
Master II
Master II

Hi.

Use set analysis:

=Count({<Visual={"-1"}>} Visual)

Not applicable
Author

Thanks for the reply.

i have tried with the code provided, however recieve the following message; Bad fieldname(s); Visual;

any tips;

Brad

whiteline
Master II
Master II

Obviously, you should change the expression according to your field names.

I guess that Visual is a field name.

Not applicable
Author

Hi.

the expression name is Visual. but it carries no real pre-defined field name.

is it still possible to calculate values from an expression?

Not applicable
Author

Thank you for your reply.

The expression is named Visual.

Is it possible to still count values if the data is derived from an expression and not a true field name?

whiteline
Master II
Master II

It's possible. But you have to use some dimension to perform such selection (as if it's done manually), for example:

=Count({<Dimension={"=(Your expression for Visual)=-1"}>} Dimension)

Not applicable
Author

Hi.

Thank you kindly once again.

I have tried to establish this logic into my application however, it seems to show error.

I was wondering If I attach my application to this mail, would it be possible for you to take a look at my dimension?

Your help would be greatly appreciated in this matter.

Best,

Brad

whiteline
Master II
Master II

Ok, I see 😃

It's a bit monstrous, cause you have a rather complex expression:

=Count({<Ärende_ID={"=((NetWorkDays(Created,[Updated])- IF(Frac([Updated]) < Time#('17:00','hh:mm'),1,0)-IF(Frac([Updated]) >  Time#('17:00','hh:mm'),1,0)- IF(Frac(Created) > Time#('08:00','hh:mm'),1,0) - IF(Frac(Created) < Time#('08:00','hh:mm'),1,0))*8+ RangeMax(((Time#('17:00','hh:mm') - Frac(Created))*24),0)+ RangeMax(((Frac([Updated]) - Time#('09:00','hh:mm'))*24),0)) > SLAend"}>} Ärende_ID)

I think you could consider to make some calculations in script to simplify it.

And just to get better understanding what it is doing (this one is not working but looks much easier):

=Count({<Ärende_ID={"=[Total Hours]>SLAend"}>} Ärende_ID)

Not applicable
Author

Thank you for your help. It came at a very needy time and now I understand how the logic should be applied to further applications.

You know Qlikview is extremely powerful once you understand the mechanics behind it all.

I am an avid SAP BW consultant but find myself more and more convinced of Qlikview.

Have a great week.

//Brad