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

Charting expression result

Hi All

I have created a straight table and added an expression called Priority ((Days<2,'0-1 Days')& if(Days>2,'2-6 Days')  that will look at some dates and result in one of two outputs.

What I then want to do is represent the results in a bar graph.  Problem is when creating my graph, Priority is not available for me to report on.  Only the non-expression fields are available.  Hope that makes sense.

Can you please help me overcome this.

cheers

5 Replies
Not applicable
Author

Hi,

Please try this expression  for Priority

IF(Days<2,'0-1 Days','2-6 Days') Hope this helps you

Thanks and Regards,

S.Amuthabharathi

amars
Specialist
Specialist

Hi Chris,

If it is working in a straight table you can use the Fast Change options inside your straight Table General Tab -> Fast Type Change -> Select Bar chart, Straight Table.

Now there will be an option at the right hand side of the caption of the chart to change the chart type.

Click on it and it will start working.

Alternatively, if you wish you can create a dimension inside your script with the same syntax and use it inside your chart. You can make use of IntervalMatch to create different intervals if it is required.

Thanks ...

Not applicable
Author

Hi Michael

Thanks for your reply however, I may not have explained myself correctly.

I have a straight table of which I added an expression to called "Priority"

I want to then create a bar graph based on the "Priority"

Problem is when right click on my sheet, select new sheet object>chart, select bar graph and make my way to the dimensions tab - the expression from the straight table is not an available field to create my graph from.

I hope that clarifies my requirement more and as a newbie to Qlikview I apologise in advance if I am missing something here.

cheers

dimensions.JPG.jpg

Not applicable
Author

Hi

Thanks for the response.  Could you help me a little further please?  How could I express the following;

if <2 then "0-1 Days" or if equal or greater than 2 and less than 7 "2-6 Days" or if equal to or greater than 7 then "7+Days"

thankyou

Not applicable
Author

Hi,

Try this

IF(Days<2,'0-1 Days',IF(Days>=2 AND Days<7,'2-6 Days',IF(Days>=7,7+Days)))