
1. Re: Is there a formula that will grab the last available value within a data set?
Alex Kerin Nov 26, 2013 10:03 AM (in response to George Nguyen)Absolutely, it will likely be something like lookup(attr([Measure],last()), but will depend on your data set layout. Can you include a tbwx please?

2. Re: Is there a formula that will grab the last available value within a data set?
Joshua Kennedy Nov 26, 2013 10:06 AM (in response to George Nguyen)What is it you are trying to do with that value? You are talking about a table calculation of somekind maybe window_max once you have everything in descending order by you datetime dimension or potentially a lookup function depending on what you want to do with those values other than just display them? There are a number of ways I could think of that would narrow your results to the Max case but you have a set of dimensions that are not always present. What data source are you using as well, Excel/SQL/Other?

3. Re: Is there a formula that will grab the last available value within a data set?
Jonathan Drummey Nov 26, 2013 10:21 AM (in response to Joshua Kennedy)If you are using Tableau 8.1, the new RANK_UNIQUE() calc with the correct sort can be used to find the last nonNull value. However, to get that for each measure you'd need to have unpivoted data so the Measure is a dimensional value instead of separate columns.

5. Re: Is there a formula that will grab the last available value within a data set?
Matt Lutton Nov 26, 2013 10:52 AM (in response to George Nguyen)I am getting an error when I try to open the packaged workbookdid you extract the data?

6. Re: Is there a formula that will grab the last available value within a data set?
George Nguyen Nov 26, 2013 10:55 AM (in response to George Nguyen)It's a packaged workbook, so the underlying data should be there.

9. Re: Is there a formula that will grab the last available value within a data set?
George Nguyen Nov 26, 2013 11:07 AM (in response to George Nguyen)OK, I just uploaded another packaged workbook, along with the excel file with the underlying data. Let me know if you can access it.
Thanks!

10. Re: Re: Is there a formula that will grab the last available value within a data set?
Jonathan Drummey Nov 26, 2013 12:46 PM (in response to George Nguyen)See the attached, I created a group to get the headings. The Rank Value is computed along Year so it partitions on all the other dimensions in the view.
Jonathan
[Edited to replace the workbook with one that returns accurate results.]

WB_Data_20131126v3 jtd v2.twbx 181.7 KB


11. Re: Is there a formula that will grab the last available value within a data set?
George Nguyen Nov 26, 2013 12:50 PM (in response to George Nguyen)Jonathan Drummey, thanks! Clever use of grouping feature!

12. Re: Is there a formula that will grab the last available value within a data set?
George Nguyen Nov 26, 2013 12:52 PM (in response to George Nguyen)Note that the scale for Internet Users and Mobile cellular subscriptions are on a scale of 100, while Motor vehicles is on a scale of 1,000. How can you convert the scale so that they are all the same  using the underlying data?

13. Re: Re: Is there a formula that will grab the last available value within a data set?
Jonathan Drummey Nov 26, 2013 1:14 PM (in response to George Nguyen)Hi George,
See the attached, I used a couple of IF statements to change the Indicator and the Value. (Also, make sure you're using RANK_UNIQUE(MIN([Year])) and not the earlier (incorrect) version).
Jonathan

WB_Data_20131126v3 jtd v3.twbx 207.2 KB
