Last active
October 21, 2015 20:03
-
-
Save ralfbecher/97c20a727f12bb421921 to your computer and use it in GitHub Desktop.
QlikView Chart Expression Counts New Products/Year
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data: | |
LOAD * INLINE [ | |
Year, Product | |
2010, P1 | |
2011, P1 | |
2012, P1 | |
2010, P2 | |
2011, P2 | |
2011, P3 | |
2012, P3 | |
2010, P4 | |
2011, P4 | |
2011, P5 | |
2012, P5 | |
2013, P2 | |
2013, P4 | |
2013, P6 | |
]; | |
// Chart Expressions: | |
=Concat(Aggr(Product & ':' & Concat(DISTINCT Year, ','), Product), '/') | |
=SubStringCount(Concat(Aggr(Product & ':' & Concat(DISTINCT Year, ','), Product), '/'), ':') | |
// Resulting Data: | |
Year;New Prd:New Prd Cnt | |
2010;P1:2010,2011,2012/P2:2010,2011,2013/P4:2010,2011,2013;3 | |
2011;P3:2011,2012/P5:2011,2012;2 | |
2012;;0 | |
2013;P6:2013;1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment