Dear all
I have the following data structure
Company | Year1 | Year2 |
A | 2018 | 2015 |
A | 2018 | 2015 |
A | 2018 | 2016 |
A | 2018 | 2016 |
A | 2018 | 2016 |
A | 2018 | 2018 |
A | 2018 | 2018 |
A | 2018 | 2018 |
A | 2018 | 2018 |
Now I want Alteryx to give out a count for each year 2015-2020
But it should only count of Year 2 os lower of equal to Year1
So that would be the output
Company | Year | Count |
A | 2015 | 0 |
A | 2016 | 0 |
A | 2017 | 0 |
A | 2018 | 9 |
Can anyone help me doing this in Alteryx?
Solved! Go to Solution.
@afv2688 Thank you so much!!!
Do you also have such a solution for the following data structure:
Company | Year1 | Year2 |
A | 2018 | 2015 |
A | 2018 | 2015 |
A | 2018 | 2016 |
A | 2018 | 2016 |
A | 2018 | 2016 |
A | 2018 | 2018 |
A | 2018 | 2018 |
A | 2018 | 2018 |
A | 2018 | 2018 |
A | 2017 | 2017 |
A | 2017 | 2018 |
Thank you @afv2688
I tired to implement the workflow in my case but it does not work (I am not capable of implementing...)
One addition to the previous table
I always want to show the timespan from 2013-2018 except if the founding of the company is later than 2013 (e.g. 2015). Then I want to show 2015-2018
Company | Year1 | Year2 | Founding |
A | 2018 | 2015 | 2013 |
A | 2018 | 2015 | 2013 |
A | 2018 | 2016 | 2013 |
A | 2018 | 2016 | 2013 |
A | 2018 | 2016 | 2013 |
A | 2018 | 2018 | 2013 |
A | 2018 | 2018 | 2013 |
A | 2018 | 2018 | 2013 |
A | 2018 | 2018 | 2013 |
A | 2017 | 2017 | 2013 |
A | 2017 | 2018 | 2013 |
A | 2019 | 2015 | 2013 |
A | 2019 | 2017 | 2013 |
A | 2019 | 2019 | 2013 |
A | 2019 | 2012 | 2013 |
A | 2019 | 2011 | 2013 |
A | 2019 | 2007 | 2013 |
B | 2016 | 2011 | 2015 |
B | 2016 | 2011 | 2015 |
B | 2016 | 2015 | 2015 |
B | 2016 | 2015 | 2015 |
Do you have an idea how to do that?
Thank you
But the value for company A in 2018 should be 11 right?
Thank you!
But for company A the timespan should start with the founding year 2013 right?
Hello @timol ,
Here you go. Based on your perrequisites (year2 <= year1 it shouldn't)
Another thing would be if we have to add the 2017 data to the 2018, calculations would need then to be different (and even then it would be 10).
If that is the case, I also added another workflow.
Regards
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |