Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello...
I am new to qlik sense, and I need help.
I have some data in excel with the following structure:
Product | Project | Sales |
---|---|---|
700 | 001 | 1000 |
700 | 001 | 2000 |
700 | 002 | 3000 |
700 | 001 | 1500 |
700 | 004 | 3000 |
700 | 002 | 4000 |
700 | 004 | 1000 |
700 | 002 | 2000 |
When I select project 001, the project 004 must be added to project 001 according to a percentage (60%), while the rest must be added to project 002 (40%). For example:
Thanks.....
Maybe something like
LOAD Product,
Project,
If(Project = '004','00'&Iterno(),Project) as NewProject,
If(Project = '004',If(Iterno()=1,0.6,0.4),1)*Sales as Sales
FROM
[https://community.qlik.com/thread/287902]
(html, codepage is 1252, embedded labels, table is @1)
While Iterno() <= If(Project = '004',2,1);
Now your Project 004 records are split into two records and assigned to 001 and 002 accordingly.
You can make your selections in NewProject to filter these two projects with the assigned values, or use Project to get the original sums.