Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date - set Analysis

Hi,

I'm a beginner to Qlikview.

I'm trying to write an expression for a graphic to sum these fields [retr.mese/importo], [retr.mese/contributi], [retr.mese/inail], [lav.strao/importo],[lav.strao/contributi], [lav.strao/inail] from 06/2012 to 09/2012.

Below an example:

codice
  azienda
codice filialematricola
  dipendente
anno cedolinimese cedoliniretr.mese/quantita'retr.mese/importoretr.mese/contributiretr.mese/inaillav.strao/quantita'lav.strao/importolav.strao/contributilav.strao/inail
411992012178857,94255,1115,65,55,351,660,1
411992012239,5532,47154,19,686,86,622,050,12
411992012383839,75250,0717,82109,823,040,21
411992012481,5893,39265,5918,9411,511,293,50,24
411992012571,5942,88281,8820,011615,714,870,33
411992012685864,31245,3518,3310,564,3319,931,36
411992012749715,88208,9515,1754,911,520,1
411992012890977,26292,6320,7210,510,313,190,22
411992012989892,0426618,91109,973,090,21
41199201210113,51149,58345,5824,39109,973,090,21
411992012111051087,74326,6123,080000
4119920121263,61071,45307,9522,7335,5188,8858,524,01

And then how can I calculate the difference between the sum of the fields [retr.mese/importo], [retr.mese/contributi], [retr.mese/inail], [lav.strao/importo],[lav.strao/contributi], [lav.strao/inail] from 06/2012 to 09/2012 and from 06/2013 to 09/2013?

Any suggestions greatly appreciated.

Regards,

Andrea

15 Replies
Not applicable
Author

Hi! I’msorry but I have another problem. The expression to sum fields from 11/2012 to
03/2013 works. When I try to create a new graphic, I don’t know how to calculate
new dimensions  as 11/2011 – 03/2012 and 11/2012– 03/2013. Maybe can you help me another time pls?

iktrayanov
Creator III
Creator III

If the expression for

11/2012 to 03/2013 is

  Sum({$<[anno cedolini] = {2012},[mese cedolini]= {'11','12'}>}[retr.mese/importo] + [retr.mese/importo] +[retr.mese/contributi] + [retr.mese/inail] + [lav.strao/importo] +[lav.strao/contributi] + [lav.strao/inail]) +

Sum({$<[anno cedolini] = {2013},[mese cedolini]= {'1','2','3'}>}[retr.mese/importo] + [retr.mese/importo] +[retr.mese/contributi] + [retr.mese/inail] + [lav.strao/importo] +[lav.strao/contributi] + [lav.strao/inail])


then for 11/2011 – 03/2012 you just replace the years like this


Sum({$<[anno cedolini] = {2011},[mese cedolini]= {'11','12'}>}[retr.mese/importo] + [retr.mese/importo] +[retr.mese/contributi] + [retr.mese/inail] + [lav.strao/importo] +[lav.strao/contributi] + [lav.strao/inail]) +

Sum({$<[anno cedolini] = {2012},[mese cedolini]= {'1','2','3'}>}[retr.mese/importo] + [retr.mese/importo] +[retr.mese/contributi] + [retr.mese/inail] + [lav.strao/importo] +[lav.strao/contributi] + [lav.strao/inail])



Not applicable
Author

Ok. I edit the expression for these period: 2011-2012, 2012-2013, ecc.

My problem is when I create my graphic I dont know how edit the properties in Chart Properties/Dimension.

I can't select fields Months or Year because I want that my graphic reports these specific range of fields: 11/2012 - 03/2013, ecc.

I think I need to create a new dimension, as 2011/2012, that show me total cost from 11/2011 to 03/2012 on a label.

You can find attached an example of what I'm trying to do.

Thank you so much for your patience! I really appreciate!

iktrayanov
Creator III
Creator III

Take a look at this(See attached I used your sample data).

I created a calculated dimension called 'Period' and then your expression is a simple sum.

Let me know if that works.

Not applicable
Author

Thank you so much for your time!

Not applicable
Author

Hi! Could you give me please any more instructions?

I’m trying to create a graphic with the following expressions:

  1. Sum of business retributions of the business selected in a input box (Select Business);
  2. Average of business retributions of the benchmark selected in a list box (Select Benchmark).

        If user chooses:

    • Option 1 – I consider only business number 4 and 95;
    • Option2 – I consider only business number 112 and 95;
    • Option 3 – I consider retribution of business number 112 and 4;

      This a very simple example, but I need to create a benchmark with a lot of lists of business and connect the user choice to my      average graphic expression. I think to insert these benchmarks in a list box.

     If I want to calculate the average of retribution fields of all my business records,  is it correct the use of this simple
     expression:
  =avg(retribuzione+contributi+straordinario+inail)

Moreover,I’d like to create a label to show the business selected and the name of benchmark chosen for the average.

I try to use these variable:  “vBusiness “ forbusiness selected and  “vBenchmark” for benchmark option selected.

You can find an example attached.

Do you think it’s possible to do?

I really appreciate any help you can provide.