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: 
julioarriaga
Creator II
Creator II

How do I create a dimension in QV object in which each record groups certain dates?

Hi everyone,

Thank you for your time in answering this question. I want to create an object (not doing it in script) that has a dimension that groups the Date field in certain values (like the Range and SumValue field at the bottom of image 1). How can I accomplish this?

Kind regards.

Capture1.PNG

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Julio,

You get this straight table with the calculated dimension Range =

=Aggr(Pick(Match(Date,

'01/07/2017',

'02/07/2017',

'03/07/2017',

'04/07/2017',

'05/07/2017'),

'R1','R1','R2','R2','R2'),Date)

Range Sum(Value)
65
R124
R241

Regards

Andrew

View solution in original post

3 Replies
Anil_Babu_Samineni

May be this?

Create Straight Table and use

Dimension

=ValueList('R1','R2')

Expression

If(ValueList('R1','R2')='R1',sum({<Date = {'01/07/2017','02/07/2017'}>}Value),

If(ValueList('R1','R2')='R2',sum({<Date = {'03/07/2017','04/07/2017', '05/07/2017'}>}Value)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
effinty2112
Master
Master

Hi Julio,

You get this straight table with the calculated dimension Range =

=Aggr(Pick(Match(Date,

'01/07/2017',

'02/07/2017',

'03/07/2017',

'04/07/2017',

'05/07/2017'),

'R1','R1','R2','R2','R2'),Date)

Range Sum(Value)
65
R124
R241

Regards

Andrew

rohitraut
Creator
Creator

Hello Julio,

Try this ,

dimension:

If(Date=makedate(2017,07,01) or Date=makedate(2017,07,02) ,'R1','R2')

Expression:

Sum(Value)

OR

Dimension:

If(Date=makedate(2017,07,01) or Date=makedate(2017,07,02) ,'R1',

     if(Date=makedate(2017,07,03) or Date=makedate(2017,07,04)  or Date=makedate(2017,07,05),'R2'))




Hope this help!