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: 
hvfalcao
Creator
Creator

Resident Load + New Field Values

Hi,

I have this table:

CustomerID, Year, Sales

1,2010,1
1,2011,1
1,2012,1
1,2013,1
1,2014,1
2,2011,1
2,2013,1

I need to create another table from the above, adding for each CustomerID all years, and set to 0 those years that the CustomerID have no sales.

CustomerID, Year, Sales

1,2010,1
1,2011,1
1,2012,1
1,2013,1
1,2014,1

2,2010,0

2,2011,1

2,2012,0

2,2013,1

2,2014,0

I just bolded the year that CustomerID 2 had no sales.

Any ideia? Thank you!

Labels (1)
1 Reply
petter
Partner - Champion III
Partner - Champion III

It is easier to add for all years and all customers and it doesn't change the calculations you do as it is either 0 values or null values as I suggest since it gives easier counting of sales...

2015-09-22 #1.PNG