Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

creating charts like Excel

Hi,

I'm trying to create a chart similar to that in Excel (see attachment). When I look at the Excel chart it has two bars, one with a target and another one with the actual time per shipment.That goes same goes for the pie chart.

When I look at my Qlikview file I have a field with LeanTime. This calculates the amount of days for shipments. The maximum leantime per shipment should not be more than 8 days. Futhermore the bar chart starts at 90%. Where can I set this up in Qlikview?

How can I simulate this in Qlikview? Should I create an expression? For example on with (if below 8 day, then on time)

Hope you can help me out.

Thanks advance!

Regards,

iSam

16 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Try this way.

    If(Field= 'JFK',

       if(Interval(Date(Date#(POD, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY hh:mm') - date(Date#(DEP, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY hh:mm'), 'd hh:mm') <= 8,'ON TIME','LATE'),

       if(Field = 'DBX',

           if(Interval(Date(Date#(POD, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY hh:mm') - date(Date#(DEP, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY hh:mm'), 'd hh:mm') <= 7,'ON TIME','LATE'))) as Status.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi There,

Thanks a lot for your help again!!! I really appreciate it.

It works, I can reload my script without error. However the results on my chart are different now:  This is the ‘old’ status field (I renamed it ‘status2’) is different than the ‘status’ field.

if(Interval(Date(Date#(POD, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY') - Date(Date#(DEP, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY'), 'D')<=7, 'OnTime', 'Late') as Status2,

The Status is script is now:

if(Re: creating charts like Excel='BJS',

     if(Interval(Date(Date#(POD, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY') - Date(Date#(DEP, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY'), 'D')<= 8, 'OnTime','Late'),

if(Re: creating charts like Excel='IZM' OR 'AMS',

     if(Interval(Date(Date#(POD, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY') - Date(Date#(DEP, 'DD-MM-YYYY hh:mm'), 'DD-MM-YYYY'), 'D')<=7, 'OnTime', 'Late'))) as Status,

It seems that the field “Status” has three ‘options’ ‘OnTime’, ‘Late’ and ‘-‘ I just don’t know where ‘-‘ comes from. :S

Not applicable
Author

Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am

23.09.2011.

Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.

Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!

Not applicable
Author

Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am

23.09.2011.

Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.

Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   When ever you use if statment, and if the field using in condition have more values then whct you have used, then you will fine - i.e NULL.

   So in your case "Creating chart like excel" field will have more values then just  BJS, AMS and IZM.

   So when every you use this field in chart as dimension then dont forget to click "suppress when NULL"

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am

23.09.2011.

Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.

Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!

Anonymous
Not applicable
Author

Hi Thanks a lot!!!! I found the problem. It wasn’t because of an extra field, it was because of the miss used “OR” statement. I did …if(destination=”IZM” OR “AMS”,….

Again Thanks for all your help, much appreciated!!!