I just started to use Tableau and I would like to know how to take the latest value available. For example I have :
ID Date Active
1 01/01/2016 1
1 01/02/2016 1
1 01/07/2016 0
2 01/02/2016 1
2 01/08/2016 0
Now I would like to have a view by month on the SUM of the Active flag, something like :
01/01/2016 1
01/02/2016 2
01/03/2016 2
01/04/2016 2
01/04/2016 2
01/05/2016 2
01/06/2016 2
01/07/2016 1
01/08/2016 0
As you can see we assume that the Active flag take the latest value available like :
1 01/01/2016 1
1 01/02/2016 1
1 01/07/2016 0
Will be transform in :
01/01/2016 1
01/02/2016 1
01/03/2016 1
01/04/2016 1
01/04/2016 1
01/05/2016 1
01/06/2016 1
01/07/2016 0
After you do the sum on the Active flag.
I think that I have to use Calculated field but I didn't manage t find the right formula.