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

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

Week aggregation

Hey Guys,

i have an additional problem:

I want to aggregate the data per day to data per week at the user surface, NOT in the Script.

For example:

Initiatl Situation:

raw data imported via sql-script:

01.01.   10

02.01    20

03.01    30

04.01    45          

05.01    45                         

06.01.   50          

07.01.    60

...

(e.g. 01.01. = Monday, 01.01. - 07.01. -> Week 1)

Favored Solution:

Output in a table-box:

CW 01    260

...

Is there a possibility to solve this problem in the chart properties via a definition?

dayweek.jpg

Someone who has an idea?

Many thanks in advance!



2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Only one change you need to do inscript, i.e Create a new field week from the date you have.

    This will give you the week number for the given date.

    You can create a new field as shown below.

     Load

        Date,

        week(Date) as Week,

       .......

     From xyz.

     Now you can use this week field in your chart to aggrigate the values.

 

     Create a chart with dimension as Week and expression as Sum(Values).

     Hope this helps.

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

Or, if you don't have access to the script, you can use calcualted dimension (not chart expression), defined like this:

=week(Date)

Expression will be the same sum(Values)