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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
fabio182
Creator II
Creator II

Transform the data

Hello, expert friends. On this occasion I turn to his powerful knowledge in data transformation. It is possible to obtain the following data transformation.


My initial data:


base_temp:

load * inline [

Periodo, Customer, Venta

201701,A,100

201702,B,200

201703,C,300

201704,A,400

201705,B,500

201706,C,600

201707,A,700

201708,B,800

201709,C,900

201710,A,1000

201711,B,1100

201712,C,1200

201801,A,1000

201802,B,2000

201803,C,3000

201804,A,4000

201805,B,5000

201806,C,6000

201807,A,7000

201808,B,8000

201809,C,9000

201810,A,10000

201811,B,11000

201812,C,12000

];


The transformed data that I want to obtain:


- Rango: Calculated field. If 201701 => 201701 - 201701; if 201703 => 201701 to 201703. .....

- Total Venta: accumulated sum accumulated sum according to the rank (rango)


    

PeriodoCustomerRangoTotal Venta
201701A201701-201701100
201702A201701-201702100
201703A201701-201703100
201704A201701-201704500
201705A201701-201705500
201706A201701-201706500
201707A201701-2017071200
201708A201701-2017081200
201709A201701-2017091200
201710A201701-2017102200
201711A201701-2017112200
201712A201701-2017122200
201801A201801-2018011000
201802A201801-2018021000
201803A201801-2018031000
201804A201801-2018045000
201805A201801-2018055000
201806A201801-2018065000
201807A201801-20180712000
201808A201801-20180812000
201809A201801-20180912000
201810A201801-20181022000
201811A201801-20181122000
201812A201801-20181222000

I hope you can help me. thank you

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You can do this using an AsOf table:

The As-Of Table

View solution in original post

2 Replies
swuehl
Champion III
Champion III

You can do this using an AsOf table:

The As-Of Table

fabio182
Creator II
Creator II
Author

Excellent reference, my friend, I had to make some changes but it helped me a lot.